Article View: borland.public.cppbuilder.database.ado
Article #1123Re: for xml auto clause under MSSQL
From: Viatcheslav V. Vassiliev
Date: Mon, 10 Jan 2005 20:22
Date: Mon, 10 Jan 2005 20:22
50 lines
2689 bytes
2689 bytes
"Output Stream" needs stream as parameter. You may use ADODB.Stream or TStreamAdapter as wrapper over existring stream. If I am not wrong, you may execute it without setting properties and you will get dataset with one column/one row - read BLOB from there. //------------------------------------------ Regards, Vassiliev V. V. http://www.managed-vcl.com - using .Net objects in Delphi for Win32 + ADO.Net http://www.oledbdirect.com - The fastest way to access MS SQL Server, MS Jet (Access) and Interbase (through OLEDB) "Tharun Pillay" <tharun@webmail.co.za> �������/�������� � �������� ���������: news:41e10b6b@newsgroups.borland.com... > > Hello all, > > Tried posting this on the XML group - don't think that was appropriate now > that I see this group exists. Anyways... > > Been browsing around all day for a code sample or information on how to > retrieve data from MS SQL Server 2000 using the "for xml clause" via ADO > (using the standard ODBC drivers) into a BCB app. It seems to come through > all garbled in the blob field. > > Saw some delphi code and tried porting it with no real luck. Looked > something like this: > > 1 OleVariant v = (AnsiString)"Output Stream"; > 2 OleVariant v2; > 3 > 4 adocmdMain->CommandText = "select * from products for xml auto" > 5 adocmdMain->Connection = ADOConnection1; > 6 adocmdMain->Properties->Item[v]->Set_Value (v2); > 7 > 8 adocmdMain->Execute(); > 9 Memo1->Lines->Text = v2.AsType(varOleStr); > > > Line 6 thows an exception the first time click the button, thgouh after that > its fine - I can sort of understand why. > > *sigh* Please could someone help me out. Thanks a mil! > .T > > > >
Technical Details
Message-ID:
<41e2e413$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<41e10b6b@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,d88f580cafc5475f X-Google-Attributes: gid10698b,public X-Google-Language: ENGLISH,ASCII From: "Viatcheslav V. Vassiliev" <support@oledbdirect.com> Newsgroups: borland.public.cppbuilder.database.ado References: <41e10b6b@newsgroups.borland.com> Subject: Re: for xml auto clause under MSSQL Date: Mon, 10 Jan 2005 23:22:43 +0300 Lines: 52 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 NNTP-Posting-Host: 217.73.240.171 Message-ID: <41e2e413$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1105388563 217.73.240.171 (10 Jan 2005 12:22:43 -0800) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail