oo4o and CLOB help!
Public Function ADDNEW_CLOB(strCLOBTEXT As String, lngWRKNUM As Long) As Boolean
On Error GoTo CATCH
' OLEDB Provider Connection Setup
Const WOJOURNAL_WONUM As Long = 0
Const WOJOURNAL_TEXT As Long = 1
Dim MyCLOB As OraClob
Dim pDstNewCLOB As OraDynaset
Dim size As Long
Dim buffer As Variant
Dim strSQL As String
strSQL = "Select "
strSQL = strSQL & "DBWONUM, "
strSQL = strSQL & "DBWOJOURNAL "
strSQL = strSQL & "from "
strSQL = strSQL & "wojournal "
strSQL = strSQL & "WHERE "
strSQL = strSQL & "DBWONUM = " & lngWRKNUM
strSQL = strSQL & "for update nowait"
'OPEN OLE DB RECORD SET
Set pDstNewCLOB = gOraDatabase.CreateDynaset(strSQL, 0&)
pDstNewCLOB.AddNew
pDstNewCLOB(WOJOURNAL_WONUM) = lngWRKNUM
pDstNewCLOB(WOJOURNAL_TEXT) = "" ( i have tried with and with out this)
pDstNewCLOB.Update
pDstNewCLOB.MoveFirst
pDstNewCLOB.Edit
Set MyCLOB = pDstNewCLOB.Fields("DBWOJOURNAL").Value
size = Len(strCLOBTEXT)
buffer = MyCLOB.Write(strCLOBTEXT, size, ORALOB_ONE_PIECE)
Set MyCLOB = Nothing
pDstNewCLOB.Update
pDstNewCLOB.Close
Set pDstNewCLOB = Nothing
ADDNEW_CLOB = True
Exit Function
CATCH:
MsgBox Err.Number & vbCrLf & Err.Description
ADDNEW_CLOB = False
End Function

