Reading BLOB field

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
goranpro
Posts: 5
Joined: Wed 01 Sep 2010 13:32

Reading BLOB field

Post by goranpro » Thu 17 May 2012 09:40

Hello,

I am trying to read blob field into stream but without success. Could you please point me the right way to do it.

This is my code:

TUniQuery *q = new TUniQuery(NULL);
q->Connection = MyConnection;
q->SQL->Text = "select blob_field from mytable";
q->Open();

TStream *st = q->CreateBlobStream((TBlobField *) q->FieldByName("BLOB_FIELD"),bmRead);

******Error: Field is not BLOB!

Thank You

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Reading BLOB field

Post by AlexP » Thu 17 May 2012 11:41

hello,

We cannot reproduce the problem.
Please specify thе name and the version of the DB you are using, also send a script for creating the table with a BLOB field

goranpro
Posts: 5
Joined: Wed 01 Sep 2010 13:32

Re: Reading BLOB field

Post by goranpro » Thu 17 May 2012 12:23

Hello AlexP,

I am so sorry, there was a mistake in my query, two fields where switched.
Now it works.
Thank You again.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Reading BLOB field

Post by AlexP » Thu 17 May 2012 12:35

Hello,

Glad to see that the problem was solved. If you have any other questions, feel free to contact us.

Post Reply