Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
-
capelin
- Posts: 14
- Joined: Fri 05 Mar 2010 05:39
Post
by capelin » Mon 22 Nov 2010 02:59
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;
The Old Version(3.0.0.9) No Problems!!!!
-
AndreyZ
Post
by AndreyZ » Tue 23 Nov 2010 10:07
Hello,
Please specify the exact IDE you are using and the SQL code you have in the UniQuery1.SQL and UniQuery1.SQLUpdate properties.
-
capelin
- Posts: 14
- Joined: Fri 05 Mar 2010 05:39
Post
by capelin » Wed 24 Nov 2010 04:10
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.
-
capelin
- Posts: 14
- Joined: Fri 05 Mar 2010 05:39
Post
by capelin » Wed 24 Nov 2010 05:06
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.
-
AlexP
- Devart Team
- Posts: 5530
- Joined: Tue 10 Aug 2010 11:35
Post
by AlexP » Wed 24 Nov 2010 08:39
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.
-
capelin
- Posts: 14
- Joined: Fri 05 Mar 2010 05:39
Post
by capelin » Fri 03 Dec 2010 01:41
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
-
AlexP
- Devart Team
- Posts: 5530
- Joined: Tue 10 Aug 2010 11:35
Post
by AlexP » Fri 03 Dec 2010 09:05
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.
-
capelin
- Posts: 14
- Joined: Fri 05 Mar 2010 05:39
Post
by capelin » Mon 20 Dec 2010 07:04
But The 3.00.0.9 is OK!!!!!!!!!!!!!!!!!!!!!!!Less than this version is correct,More than this version all have a problem!!!!!!!!!!!!!!!!!
But The 3.00.0.9 is OK!!!!!!!!!!!!!!!!!!!!!!!Less than this version is correct,More than this version all have a problem!!!!!!!!!!!!!!!!!
-
AndreyZ
Post
by AndreyZ » Mon 20 Dec 2010 10:08
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.
-
capelin
- Posts: 14
- Joined: Fri 05 Mar 2010 05:39
Post
by capelin » Tue 21 Dec 2010 09:18
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.
-
AndreyZ
Post
by AndreyZ » Wed 22 Dec 2010 13:13
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.