🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #3886

Urgent: Blobs and ADO problem in Builder 5

#3886
From: Paul McBryde
Date: Fri, 14 Jun 2002 00:49
34 lines
2127 bytes
I am using ADO Tables and trying to write to a Blob Field in C++
Builder 5. The BlobStream is operating fine and I have verified that
my data is written to it.
But following a Post command, which should send it to the ADO Table
(Access 97 Database), the BlobStream is not written into the database.
The field where it should be is empty. Here is an extract of one of
the many methods I have
tried:

TADOBlobStream *lStream = NULL;
short int num;
lStream = (TADOBlobStream*)pTrendTable->CreateBlobStream(pTrendTable->FieldByName(MPWM_PARAM_TREND),bmReadWrite);
for (int i = 0; i < 1000; i++)
{
   // Store param value as short int in blob-stream
   num = (short int)i * 2;
   lStream->Write(&num, sizeof(short int));
}
pTrendTable->FieldByName(MPW_SYSTEM_ID)->AsString = lSystem_ID;
pTrendTable->FieldByName(MPW_STUDY_ID)->AsString = lStudy_ID;
pTrendTable->FieldByName(MPW_PATIENT_NO)->AsInteger = lPatient_No;
pTrendTable->FieldByName(MPWM_SESSION_ID)->AsInteger = lSession_ID;
pTrendTable->FieldByName(MPWM_PARAM_ID)->AsInteger = np + 1;
pTrendTable->Post();
delete lStream;
lStream = NULL;

   Values are posted to all the above fields except the BlobField. I
am using Microsoft Jet 4.0 OLE DB Provider.

If anyone can help, it would be greatly appreciated.

Cheers,
Paul
Technical Details
Message-ID: <f0bc2e16.0206131649.62e2d224@posting.google.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!postnews1.google.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,249b5cedbae14950,start
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2002-06-13 17:49:25 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!postnews1.google.com!not-for-mail
From: funkahedron@hotmail.com (Paul McBryde)
Newsgroups: borland.public.cppbuilder.database.ado
Subject: Urgent: Blobs and ADO problem in Builder 5
Date: 13 Jun 2002 17:49:24 -0700
Organization: http://groups.google.com/
Lines: 34
Message-ID: <f0bc2e16.0206131649.62e2d224@posting.google.com>
NNTP-Posting-Host: 210.9.177.26
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1024015764 495 127.0.0.1 (14 Jun 2002 00:49:24 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: 14 Jun 2002 00:49:24 GMT