Page 1 of 1

Reading BLOB field

Posted: Thu 17 May 2012 09:40
by goranpro
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

Re: Reading BLOB field

Posted: Thu 17 May 2012 11:41
by AlexP
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

Re: Reading BLOB field

Posted: Thu 17 May 2012 12:23
by goranpro
Hello AlexP,

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

Re: Reading BLOB field

Posted: Thu 17 May 2012 12:35
by AlexP
Hello,

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