BLOB and insert command

BLOB and insert command

Postby zvasku » Thu 12 Apr 2007 12:26

Hello,

we have problem with TSQLQuery like this:

insert into TABLE(ID,DATA) values(1,:DATAPAR)

field data is blob. If we use

SQLQuery1.ParamByName('DATAPAR').LoadFromStream(Stream,ftBlob)

and size of stream is larger than 4000 bytes then ExecSQL returns ORA-01460.

Do we have to use another way to store such a value to db or is there someting wrong?

Best regards
Zdenek, Dbexpoda30.dll 3.1.0.7, D2006, Oracle 10gR2, NET mode
zvasku
 
Posts: 72
Joined: Tue 19 Sep 2006 12:04

Postby zvasku » Thu 12 Apr 2007 13:01

In OCI mode all works ok. Prolem is in NET mode only.

Zdenek
zvasku
 
Posts: 72
Joined: Tue 19 Sep 2006 12:04

Postby Plash » Thu 12 Apr 2007 14:35

You should change the SQL property of the TSQLQuery component to the following:
Code: Select all
INSERT INTO TABLE(ID,DATA) VALUES (1, empty_blob())
RETURNING DATA INTO :DATAPAR
You should also replace the second parameter value that you are passing to the LoadFromStream method with ftOraBlob.
Plash
Devart Team
 
Posts: 2844
Joined: Wed 10 May 2006 07:09

Postby zvasku » Fri 13 Apr 2007 08:24

It works

Thanks
Zdenek
zvasku
 
Posts: 72
Joined: Tue 19 Sep 2006 12:04


Return to dbExpress driver for Oracle