Page 1 of 1

Can't update blob fields by ClientDataSet in derict mode

Posted: Thu 07 May 2009 02:08
by lk
table:
create table ORDERIMAGEINFO
(
FAC_NO VARCHAR2(5) not null,
ORDER_NO VARCHAR2(20) not null,
IMAGE BLOB
)

sqlconnection: Devart Oracle Direct

sqlQuery: select * from ORDERIMAGEINFO
code:
ClientDataSet1.Edit;
ClientDataSet1IMAGE.LoadFromFile('c:\1.jpg');
ClientDataSet1.Post;

ClientDataSet1.ApplyUpdates(0);
when call ClientDataSet1.ApplyUpdates(0) wait long time get oracle EIhternalError?

but when change DevartOracleDirect to DevartOracle driver it's no problem, why? is DevartOracleDirect bug?

Posted: Thu 07 May 2009 08:34
by Plash
Please specify the character set of your database.

Posted: Fri 08 May 2009 08:18
by lk
first i install dbExpress driver for Oracle 4.4.0.13 have this problem,
but when I upgrade to 4.4.0.15 it's work fine, not have this problem.
but in 4.4.0.15 have another problem
where i add a string field in delphi 2009 design time it's TStringField,
when i run this program get :Exception class EDatabaseError with message 'SQLDataSet1: Type mismatch for field 'ENAME', expecting: String actual: WideString'. Process Project1.exe (3988)

why?

Posted: Fri 08 May 2009 08:44
by Plash
To avoid the problem, you should add UseUnicode=True to the Params property of TSQLConnection before creating fields.

Posted: Fri 08 May 2009 09:23
by lk
Plash wrote:To avoid the problem, you should add UseUnicode=True to the Params property of TSQLConnection before creating fields.
Thank you!