Can't update blob fields by ClientDataSet in derict mode

Can't update blob fields by ClientDataSet in derict mode

Postby lk » Thu 07 May 2009 02:08

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?
lk
 
Posts: 11
Joined: Thu 07 May 2009 01:52

Postby Plash » Thu 07 May 2009 08:34

Please specify the character set of your database.
Plash
Devart Team
 
Posts: 2844
Joined: Wed 10 May 2006 07:09

Postby lk » Fri 08 May 2009 08:18

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?
lk
 
Posts: 11
Joined: Thu 07 May 2009 01:52

Postby Plash » Fri 08 May 2009 08:44

To avoid the problem, you should add UseUnicode=True to the Params property of TSQLConnection before creating fields.
Plash
Devart Team
 
Posts: 2844
Joined: Wed 10 May 2006 07:09

Postby lk » Fri 08 May 2009 09:23

Plash wrote:To avoid the problem, you should add UseUnicode=True to the Params property of TSQLConnection before creating fields.


Thank you!
lk
 
Posts: 11
Joined: Thu 07 May 2009 01:52


Return to dbExpress driver for Oracle