Page 1 of 1

The pictures save to blob field has problems!BUG!!!!

Posted: Mon 22 Nov 2010 02:59
by capelin
Version:Unidac3.5.0.12
Database:Mysql 5.x
Table:Create Table test ('id' int(11),'img' Blob);
Code:
UniQuery1.Edit;
TBlobField(UniQuery1.FieldByName('img')).LoadFromFile('c:\a.jpg');
UniQuery1.Post;
Image

The Old Version(3.0.0.9) No Problems!!!!

Why?

Posted: Tue 23 Nov 2010 03:44
by capelin
No Replay?

Posted: Tue 23 Nov 2010 10:07
by AndreyZ
Hello,

Please specify the exact IDE you are using and the SQL code you have in the UniQuery1.SQL and UniQuery1.SQLUpdate properties.

Posted: Wed 24 Nov 2010 04:10
by capelin
I have already set up the SQL statement(UniQuery1.SQL and UniQuery1.SQLUpdate), but still wrong!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

But old Version(3.0.0.9) No Problems.

Posted: Wed 24 Nov 2010 05:06
by capelin
UniQuery1.SQL.Text:='Update test set img=:img';
UniQuery1.Params[0].LoadFromFile('c:\a.jpg',ftBlob);
UniQuery1.Execute;

But still wrong!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

But old Version(3.0.0.9) No Problems.

Posted: Wed 24 Nov 2010 08:39
by AlexP
Hello,

Unfortunately we can not reproduce the problem.
Please try to reproduce the problem in the Pictures UniDAC demo project.
Also please send a complete small sample to alexp*devart*com to demonstrate the problem and please specify the version of your IDE.

Posted: Fri 03 Dec 2010 01:41
by capelin
The same procedures, in the old versions can run, in the new version can not be executed.

Version:Unidac3.5.0.12
Database:Mysql 5.x
IDE:Delphi7
System:WindowsXPsp3
Table:Create Table test ('id' int(11),'img' Blob);
Code:
UniQuery1.Close;
UniQuery1.SQL.Text:='SELECT * FROM test WHERE id=1';
UniQuery1.Open;
UniQuery1.Edit;
TBlobField(UniQuery1.FieldByName('img')).LoadFromFile('c:\a.jpg');
UniQuery1.Post;

Submit error!

Old Version (Etc.3.0.0.9 pre) No Problems

Posted: Fri 03 Dec 2010 09:05
by AlexP
Hello,


Please try to execute the following code:

try
UniConnection1.ExecSQL('DROP TABLE test;',[null]);
except
end;
UniConnection1.ExecSQL('Create Table test (id int(11),img LongBlob);',[null]);
UniConnection1.ExecSQL('INSERT INTO test(id) VALUES(1);',[null]);
UniQuery1.SQL.Text:= 'SELECT * FROM test WHERE id=1';
UniQuery1.Open;
UniQuery1.Edit;
TBlobField(UniQuery1.FieldByName('img')).LoadFromFile('e:\1.jpg');
UniQuery1.Post;

if error persists, please set the UniQuery.Debug property to true and specify the result SQL statment.

Running the code still wrong.

Posted: Mon 20 Dec 2010 07:04
by capelin
But The 3.00.0.9 is OK!!!!!!!!!!!!!!!!!!!!!!!Less than this version is correct,More than this version all have a problem!!!!!!!!!!!!!!!!!
Image
But The 3.00.0.9 is OK!!!!!!!!!!!!!!!!!!!!!!!Less than this version is correct,More than this version all have a problem!!!!!!!!!!!!!!!!!

Posted: Mon 20 Dec 2010 10:08
by AndreyZ
Unfortunately, we still cannot reproduce this problem. Please try composing a small sample to demonstrate the problem and send it to andreyz*devart*com. It will be the fastest way to resolve this problem.

Not only picture file all documents saved to blob field have

Posted: Tue 21 Dec 2010 09:18
by capelin
Not only picture file all documents saved to blob field have a problem.
A mail sended to andreyz*devart*com

Version:Unidac3.5.0.12~14
Database:Mysql 5.1.x
IDE:Delphi7
System:WindowsXPsp3

You just test can be found this problem, but but you have never been solved, was disappointing.

Posted: Wed 22 Dec 2010 13:13
by AndreyZ
Thank you for the information. We have fixed this problem. This fix will be included in the next UniDAC build. As a workaround you can use the UTF8 charset instead of GBK.