🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.database.ado
3 messages
3 total messages Started by lymtex Thu, 23 Feb 2006 15:53
Image in blob
#679
Author: lymtex
Date: Thu, 23 Feb 2006 15:53
3 lines
1023 bytes
Anyone knows how to insert an image in a blob field using the components 
ADOConnection, ADOCommand and ADODataSet? the image can be BMP or JPG. 
Thanks...... 
Re: Image in blob
#681
Author: GIGI
Date: Mon, 27 Feb 2006 07:49
14 lines
1666 bytes
It depends on the OLE ODBC driver You're using. But in most cases u can
use LoadFrom(File/Stream) method.
TAdoQuery aq;
//init here  the AdoQuery
aqInsert->Parameters->ParamByName("PIC")->DataType = ftBlob;
TMemoryStream pPic;
      if ( FileExists( sPicPath ) )     {
        pPic->LoadFromFile ( sPicPath );
      }
      aqInsert->Parameters->ParamByName("PIC")->LoadFromStream( pPic,
ftBlob );

Hope this helps.
GIGI
Re: Image in blob
#297
Author: Dmitry Konnov
Date: Sat, 01 Jul 2006 07:20
5 lines
1094 bytes
TBlobField *a_Blob = reinterpret_cast<TBlobField
*>(DataSet->FieldByName("BlobField"));
a_Blob->LoadFromFile...

Dmitry
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads