Re: Reading jpeg binaries from mysql-db
- From: "Thomas Wormser" <thworms@xxxxxxx>
- Date: Mon, 21 Aug 2006 17:19:30 +0200
Ok, have done it now with a dataset component and Locate function.
This seems to work without the error "Different types for field 'fileblob';
expecting: Blob"
"Thomas Wormser" <thworms@xxxxxxx> schrieb im Newsbeitrag
news:44e983bf@xxxxxxxxxxxxxxxxxxxxxxxxx
Hi all,
meanwhile I can store jpeg's and bitmap's data in mysql longblob
fiedltype.
Reading from this field over blobstream does work correctly.
The only curious thing comes up when I want to open the dataset.
In some cases I get an error like this:
"querybinaries: Different types for field 'fileblob'; expecting: Blob,
found: Varbytes"
My code for openinfg the dataset looks like this:
with Data.queryBinaries do
Close;
SQL.Clear;
SQL.Add('select id,source,fileblob,thumb from binaries where
id=:GetIds');
Parameters[0].Value := id;
Open;
end;
This error comes directly after the open statement.
The field "fileblob" is actually defined as longblob in mysql . Delphi 7
has mapped it
as fieldtype "ftBlob" in field definition.
But I get this error only sometimes.
What's going wrong here ?
cu,
Thomas Wormser
.
- References:
- Reading jpeg binaries from mysql-db
- From: Thomas Wormser
- Reading jpeg binaries from mysql-db
- Prev by Date: Re: DBMemo x OnGetText and OnSetText? how?
- Next by Date: To recover the name of an action to execute
- Previous by thread: Reading jpeg binaries from mysql-db
- Next by thread: To recover the name of an action to execute
- Index(es):