Thread View: borland.public.cppbuilder.database.ado
2 messages
2 total messages
Started by Paolo Borlandi
Thu, 21 Sep 2006 22:16
How to write to a MEMO field
Author: Paolo Borlandi
Date: Thu, 21 Sep 2006 22:16
Date: Thu, 21 Sep 2006 22:16
18 lines
1141 bytes
1141 bytes
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??
Thank You very much!!
Paolo from Italy
Re: How to write to a MEMO field
Author: Arnie
Date: Fri, 22 Sep 2006 17:36
Date: Fri, 22 Sep 2006 17:36
30 lines
1899 bytes
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
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