🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: How to write to a MEMO field

#377
From: Arnie
Date: Fri, 22 Sep 2006 17:36
30 lines
1899 bytes
"Paolo Borlandi" <pbprivato@virgilio.it> wrote in message 
news:45130f69$1@newsgroups.borland.com...
> HI ALL
>
> I'm trying to write some text into a memo field by this code
>
>
> TADOBlobStream *BS = new 
> TADOBlobStream((TBlobField*)t1->FbN("testo"), mWrite);
>
> const char H[21]={"TESTTEST"};
>
> BS->Write(H, strlen(H) );
>
> But it doesn't work! What is wrong?

I don't know.  I've always found the BLOB stuff pretty flakey. 
Here's the way we currently do it and it works.

   TMemoryStream *MS = new TMemoryStream;
   // m_MenuFlags is an unsigned char array.
   MS->Write( m_MenuFlags, sizeof(m_MenuFlags) );
   // Seek back to the beginning of the memory stream
   MS->Seek( 0, soFromBeginning );
   // Parameters->Items[4] is a BLOB (or MEMO) field
   qry->Parameters->Items[4]->LoadFromStream( MS, ftBlob );
   delete MS;

Good luck,
- Arnie 
Technical Details
Message-ID: <45141e2a@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeed.freenet.de!213.132.189.2.MISMATCH!multikabel.net!feed20.multikabel.net!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <45130f69$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,9033f2d225a722ba
X-Google-Attributes: gid10698b,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Arnie" <none>
Newsgroups: borland.public.cppbuilder.database.ado
References: <45130f69$1@newsgroups.borland.com>
Subject: Re: How to write to a MEMO field
Date: Fri, 22 Sep 2006 13:36:26 -0400
Lines: 32
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2869
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962
NNTP-Posting-Host: 12.29.236.34
Message-ID: <45141e2a@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1158946346 12.29.236.34 (22 Sep 2006 10:32:26 -0700)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeed.freenet.de!213.132.189.2.MISMATCH!multikabel.net!feed20.multikabel.net!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail