Board index » cppbuilder » Blob field in a TQuery in Interbase

Blob field in a TQuery in Interbase


2004-10-16 02:01:22 AM
cppbuilder40
How to parametrize TQuery for BLOB fields
INSERT INTO students (STUDENT, PHOTO, COMMENTS) VALUES (:stucode,
:stuphoto, :stumemo)
Where PHOTO and COMMENTS are BLOB type
these does not work
DataModule1->Query1->Params->Items[0]->AsString=Edit1->Text;
DataModule1->Query1->Params->Items[1]->AsBlob=Image1->Picture;
DataModule1->Query1->Params->Items[2]->AsMemo=Memo1->Lines;
I am using C++ Builder 4 and Interbase 6 for a Client /Server app
Thanks
 
 

Re:Blob field in a TQuery in Interbase

Use
Params->Items[x]->LoadFromStream(Stream, ftBlob);
or
Params->Items[x]->LoadFromStream(Stream, ftMemo);
//------------------------------------------
Regards,
Vassiliev V. V.
www.managed-vcl.com - using .Net objects in Delphi for Win32 +
ADO.Net
www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)
"Alain Bastien" < XXXX@XXXXX.COM >сообщи?сообщила ?новостях
следующе? news: XXXX@XXXXX.COM ...
Quote
How to parametrize TQuery for BLOB fields

INSERT INTO students (STUDENT, PHOTO, COMMENTS) VALUES (:stucode,
:stuphoto, :stumemo)


Where PHOTO and COMMENTS are BLOB type

these does not work
DataModule1->Query1->Params->Items[0]->AsString=Edit1->Text;
DataModule1->Query1->Params->Items[1]->AsBlob=Image1->Picture;
DataModule1->Query1->Params->Items[2]->AsMemo=Memo1->Lines;

I am using C++ Builder 4 and Interbase 6 for a Client /Server app

Thanks




 

Re:Blob field in a TQuery in Interbase

Can't find any examples in book or Help file I've tried you example but
can't get it right
would be great if you could use correct my original below for Item[1] and
Item[2]
Blob and Memo fields
Thanks
Alain
 

{smallsort}

Re:Blob field in a TQuery in Interbase

This works fine with ADO but I can not reproduce it with BDE. Sorry.
//------------------------------------------
Regards,
Vassiliev V. V.
www.managed-vcl.com - using .Net objects in Delphi for Win32 +
ADO.Net
www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)
"Alain Bastien" < XXXX@XXXXX.COM >сообщи?сообщила ?новостях
следующе? news: XXXX@XXXXX.COM ...
Quote
Can't find any examples in book or Help file I've tried you example but
can't get it right

would be great if you could use correct my original below for Item[1] and
Item[2]
Blob and Memo fields

Thanks

Alain



--
Alain Bastien
141 Ollier Avenue
Rose Hill
Mauritius
Viatcheslav V. Vassiliev < XXXX@XXXXX.COM >wrote in message
news:41701e8d$ XXXX@XXXXX.COM ...
>Use
>
>Params->Items[x]->LoadFromStream(Stream, ftBlob);
>or
>Params->Items[x]->LoadFromStream(Stream, ftMemo);
>
>file://------------------------------------------
>Regards,
>Vassiliev V. V.
>www.managed-vcl.com - using .Net objects in Delphi for Win32 +
>ADO.Net
>www.oledbdirect.com - The fastest way to access MS SQL Server,
>MS Jet (Access) and Interbase (through OLEDB)
>
>"Alain Bastien" < XXXX@XXXXX.COM >сообщи?сообщила ?новостях
>следующе? news: XXXX@XXXXX.COM ...
>>How to parametrize TQuery for BLOB fields
>>
>>INSERT INTO students (STUDENT, PHOTO, COMMENTS) VALUES
(:stucode,
>>:stuphoto, :stumemo)
>>
>>
>>Where PHOTO and COMMENTS are BLOB type
>>
>>these does not work
>>DataModule1->Query1->Params->Items[0]->AsString=Edit1->Text;
>>DataModule1->Query1->Params->Items[1]->AsBlob=Image1->Picture;
>>DataModule1->Query1->Params->Items[2]->AsMemo=Memo1->Lines;
>>
>>I am using C++ Builder 4 and Interbase 6 for a Client /Server app
>>
>>Thanks
>>
>>
>>
>>
>
>