Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using CLOBS with Oracle ODBC Driver (in Windows)

Status
Not open for further replies.

MattWoberts

Programmer
Oct 12, 2001
156
GB
Hi,

We are using VB Components from ASP to read/write data to CLOBS. The trouble is, we are having problems with text over 4k. We get the following error trying to insert text > 4k using the latest Oracle ODBC driver:

Ora-01704: String Literal too long.

I have looked through other postings related to this, and it seems that a solution may be to prepare/bind the statement. I was hoping that someone may have an example of doing this in VB, the code we use at the moment to insert data looks like this:

' Create the ADO objects
Dim cmd As ADODB.Command
Set cmd = New ADODB.Command

cmd.ActiveConnection = sConnect
cmd.CommandText = strSQL
cmd.CommandType = adCmdText

' Execute the query without returning a recordset
cmd.Execute , , adExecuteNoRecords

Can anyone shed some light, and will we need to change the way that we read the data from the CLOBS also (we currently just use a tyical "Select X from Y" statement and assign the recordset to values like this:

sText = rs("A_CLOB_COL")

Thanks,

Matt Roberts
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top