Article View: borland.public.cppbuilder.database.ado
Article #588Re: ADODB.Stream objects and Variants
From: Viatcheslav V. Vassiliev
Date: Fri, 16 Sep 2005 20:40
Date: Fri, 16 Sep 2005 20:40
37 lines
2294 bytes
2294 bytes
You can:
- wrap stream using TOleStream (ADODB.Stream implements IStream);
- wrap your memStream with TStreamAdapter and use it instead of ADODB.Stream
(when you pass stream, pass Variant of type IUnknown and value should have
interface that can be queried for IStream, IStream is implemented in
TStreamAdapter).
//------------------------------------------
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)
"Russell Allen" <russell.allen@bt.com> �������/�������� � ��������
���������: news:432aa5ea$1@newsgroups.borland.com...
>
> Hi all,
>
> I'm working on CBuilder 5 without ADO controls, so I'm currently using
> Variants to access ADO. How can I get the following code (or something
> like it) to work?
>
> void putStream (TMemoryStream *memStream) {
> Variant stream = CreateOleObject("ADODB.Stream");
> stream.OleProcedure("Open");
> stream.OleProcedure("Write", memStream);
> }
>
> I know the above code doesn't appear to do anything, but I've got code
> I've left out which then goes on to do something with the stream Variant.
>
> Thanks all,
>
> Russ
> Russell Allen
Technical Details
Message-ID:
<432b2d80@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<432aa5ea$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,2a0e8802e733b24c X-Google-Attributes: gid10698b,public X-Google-Language: ENGLISH,ASCII From: "Viatcheslav V. Vassiliev" <support@oledbdirect.com> Newsgroups: borland.public.cppbuilder.database.ado References: <432aa5ea$1@newsgroups.borland.com> Subject: Re: ADODB.Stream objects and Variants Date: Sat, 17 Sep 2005 00:40:48 +0400 Lines: 39 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2670 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670 X-RFC2646: Format=Flowed; Original NNTP-Posting-Host: 85.93.138.132 Message-ID: <432b2d80@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1126903168 85.93.138.132 (16 Sep 2005 13:39:28 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail