🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: C++ Builder 6 w/ADO and SQL2000 using the "FOR XML EXPLICIT" in a SP to generate XML

#3399
From: Tim Martin
Date: Thu, 12 Sep 2002 18:05
44 lines
2562 bytes
Maybe I should be asking is, "Does the ADO components in CB6 support the new
"Output Stream" property in the Command object that was introduced with MDAC
2.6 and if so how do I access it?

Tim

"Tim Martin" <tmartin@commandalkon.com> wrote in message
news:3d808961$1@newsgroups.borland.com...
> Is there anyone out there who can help in showing me how to return the
BLOB
> that is generated by using the "FOR XML EXPLICIT" within an Stored
> Procedure.  I am using the TADOStoredProcedure object to call the SP and
> return the result.  The Field name is returned okay and even the size
> appears correct but I cannot get the text.  I found a couple of examples
of
> how to retrieve images but I can not get them to work.  Also I used the
> "CreateBlobStream()" method and still was unsuccessful.  When I run the
> query in QueryAnalzer it returns the correct data.  The ADO book suggests
> assigning a stream to the "Output Stream" property of a Command object and
> then accessing the stream.  Does anyone have experience with doing this
and
> can provide a clue to what I am missing?
>
> Current code looks like...
>
> String strTemp;
>
> TStream *pBlob = ADOSP_GetOptions->CreateBlobStream(
> ADOSP_GetOptions->Fields->Fields[0],bmRead);
>
> char *szBuf = malloc( pBlob->Size );
>
> int iSize = pBlob->Read( szBuf,pBlob->Size );
>
> strTemp = AnsiString( szBuf,iSize );
>
> delete pBlob;
> free( szBuf );
>
> Thanks,
>
> Tim
>
>
Technical Details
Message-ID: <3d80d77b$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-04!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!isdnet!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3d808961$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,bdaea7592131e271
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2002-09-12 11:18:10 PST
From: "Tim Martin" <tmartin@commandalkon.com>
Newsgroups: borland.public.cppbuilder.database.ado
References: <3d808961$1@newsgroups.borland.com>
Subject: Re: C++ Builder 6 w/ADO and SQL2000 using the "FOR XML EXPLICIT" in a SP to generate XML 
Date: Thu, 12 Sep 2002 14:05:47 -0400
Lines: 46
Organization: Command Alkon Inc.
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4807.1700
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
NNTP-Posting-Host: 12.109.108.147
Message-ID: <3d80d77b$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1031853947 12.109.108.147 (12 Sep 2002 11:05:47 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-04!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!isdnet!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail