🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: ADOQuery

#1560
From: Arnie Mauer
Date: Mon, 17 May 2004 17:24
34 lines
2022 bytes
"kev" <kev@isp.com> wrote in message news:40a8b874@newsgroups.borland.com...
> Some time ago I posted some questions regarding Blobs. It turns out that
the
> field I was trying to access was defined as VarBinary(8000) so I could not
> use blob stram (as indicated by V. Vassiliev in an earlier response).  The
> advise I was given was to use ADOQuery->Fields->Fields[]->Value  OR
> ADOQuery->Recordset->Fields->Item[]->Value.
>
> Fields->Value yields a NULL or "".  I tried the Recordset, but it does not
> seem to be a correct statement.  I finally tried
>
> char *Buffer.
> Buffer =(char*) ADOQuery1->Fields->Fields[4];
>
> I get something that looks like it might be a pointer, but can't get any
> further.  Can someone please assist me in getting this data from this
field?
> It is field [4] and is a byte array with the next field [5] defining the
> length.
>
> thanks,
> kev
>

I don't know if this will work for you or not.  It works for us, but we're
reading BLOBs.

AnsiString s = ADOQuery1->FieldByName( "theField" )->AsString;

s.Length() indicates how many bytes were actually read.

HTH,

- Arnie
Technical Details
Message-ID: <40a8f57a$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!controlnews3.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!colt.net!peernews3.colt.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <40a8b874@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,5cd61b8b304e7864
X-Google-Attributes: gid10698b,public
From: "Arnie Mauer" <xxx@nowhere.net>
Newsgroups: borland.public.cppbuilder.database.ado
References: <40a8b874@newsgroups.borland.com>
Subject: Re: ADOQuery
Date: Mon, 17 May 2004 13:24:30 -0400
Lines: 36
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 209.140.211.97
Message-ID: <40a8f57a$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1084814714 209.140.211.97 (17 May 2004 10:25:14 -0700)
Path: arc1-ca.pugleaf.net!controlnews3.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!colt.net!peernews3.colt.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail