Problem with BLOB fields
Posted: 05.11.2006, 14:03
How i can insert data in blob field?
next code doesn`t work correct:Field "Question_id" have value, but Field "Question" is empty!!!
But code: work correct.
I work in C++Builder6 with embedded MySQL 4.1 and ZEOSLIB(rev 113)
PLEASE HELP!!!
next code doesn`t work correct:
Code: Select all
TStream *Stream2;
Form2->ZQ2->Insert();
Stream2 = Form2->ZQ2->CreateBlobStream(Form2->ZQ2->FieldByName("Question"), bmWrite);
Form2->ZQ2->FieldByName("Question_id")->AsInteger=a;
Stream2->Write("lalalala",8);
//or Stream2->CopyFrom(..........);
Form2->ZQ2->Post();
But code:
Code: Select all
TStream *Stream2;
Form2->ZQ2->Insert();
Form2->ZQ2->FieldByName("Question_id")->AsInteger=a;
Form2->ZQ2->FieldByName("Question")->AsString="lalalala";
Form2->ZQ2->Post();
I work in C++Builder6 with embedded MySQL 4.1 and ZEOSLIB(rev 113)
PLEASE HELP!!!