Home » Developer & Programmer » Precompilers, OCI & OCCI » how to update BLOB using OCCI (C++)?
how to update BLOB using OCCI (C++)? [message #243310] Wed, 06 June 2007 18:07 Go to next message
prusakov
Messages: 2
Registered: June 2007
Location: San Diego, CA
Junior Member
Hello,

I'm trying to get my program to execute the following SQL statement:

SQL_STRING = "update MYTABLE SET COLUMN1=:val1, COLUMN2=:val2 where COLUMN3=:val3"


where COLUMN1 is a BLOB datatype and COLUMN2 is a NUMBER datatype.
I'm using OCCI interface.

Blob blob(pConn);
blob.write(size, buffer, size);

Statement stmt = connection->createStatement(SQL_STRING);
stmt.setBlob(1, blob);
stmt.setNumber(2, value2);
stmt.setString(3, string);


I am getting SQLException with Oracle message:
Error ORA-22275: invalid LOB locator specified

What's the right way to insert new (updated) BLOB object into the existing row?

Links to a good OCCI tutorial or example code are also appreciated.
Re: how to update BLOB using OCCI (C++)? [message #243666 is a reply to message #243310] Fri, 08 June 2007 05:20 Go to previous messageGo to next message
tahpush
Messages: 961
Registered: August 2006
Location: Stockholm/Sweden
Senior Member

link
Re: how to update BLOB using OCCI (C++)? [message #243727 is a reply to message #243666] Fri, 08 June 2007 12:02 Go to previous message
prusakov
Messages: 2
Registered: June 2007
Location: San Diego, CA
Junior Member
been there, read that. Did not find it exactly helpful.

thanks for your response, anyway.
Previous Topic: ORA-00607: Internal error occurred while making a change to a data block
Next Topic: purify report the oraconnect has problem,how to resolve it?
Goto Forum:
  


Current Time: Mon Dec 05 13:15:24 CST 2016

Total time taken to generate the page: 0.15567 seconds