Article View: borland.public.cppbuilder.database.ado
Article #1729Re: CreateBlobStream
From: kdl
Date: Tue, 20 Apr 2004 20:17
Date: Tue, 20 Apr 2004 20:17
83 lines
4078 bytes
4078 bytes
Thanks very much for the help, but please excuse my ignorance. I do not see
any references in help for load or save "toStream" relating to blobs or
"BobFields". Would it be possible to show me an example of this method? If
I am connected to an MS SQL database that has a blob field defined as
varByte with size of 8000, what would be the statement that I would use to
get this info from the field. I am using an ADODataSet and the field is
named "TraceDetails' or fields[4].
thanks you very much for your assistance.
kev.
"Viatcheslav V. Vassiliev" <support@oledbdirect.com> wrote in message
news:40854a43$1@newsgroups.borland.com...
> BlobField->LoadFromStream() and SaveToStream() works with any TStream
> including TMemoryStream etc.
>
> //------------------------------------------
> 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)
>
> "kdl" <me@isp.net> �������/�������� � �������� ���������:
> news:4085340d@newsgroups.borland.com...
> > Don't I need to have a stream first? I am trying to get data already
> > contained in a blob field into a stream. The program crashes when I try
> to
> > create a stream.
> >
> > thanks.
> >
> > "Viatcheslav V. Vassiliev" <support@oledbdirect.com> wrote in message
> > news:4084f3da$1@newsgroups.borland.com...
> > > Why do not you use BlobField->LoadFromStream()?
> > >
> > > //------------------------------------------
> > > 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)
> > >
> > > "kdl" <me@isp.net> �������/�������� � �������� ���������:
> > > news:4083e397@newsgroups.borland.com...
> > > > I am having major difficulty in getting CreateBlobStream to work
> > properly
> > > > with Builder 6. I am using the code below and I can get it to
> compile,
> > > but
> > > > the program crashes with a message like "Invalid Variant Operation".
> I
> > am
> > > > connected to a MS SQL database and the field that I am trying to
> access
> > is
> > > > defined as a VarByte with a size of 8000. The help in BCB6 is not
> > correct
> > > > for ADO blobs and I cannot find any other help on the web. I am
stuck
> > at
> > > > this point. Please help if there are any sugestions.
> > > >
> > > > int MemSize;
> > > > char *Buffer;
> > > > TADOBlobStream *Stream;
> > > >
> > > > //Crashes on this line. I have tried many variations including
> > > > "CreateBlobStream"with no success.
> > > > Stream = new TADOBlobStream((TBlobField
> > > > *)adoTraceDetailsDataSet->FieldByName("TraceArray") , bmRead);
> > > >
> > > >
> > >
> > >
> >
> >
>
>
Technical Details
Message-ID:
<40858559$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<4083e397@newsgroups.borland.com> <4084f3da$1@newsgroups.borland.com> <4085340d@newsgroups.borland.com> <40854a43$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: 10698b,eb986792cae970be X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2004-04-20 13:40:07 PST From: "kdl" <me@isp.net> Newsgroups: borland.public.cppbuilder.database.ado References: <4083e397@newsgroups.borland.com> <4084f3da$1@newsgroups.borland.com> <4085340d@newsgroups.borland.com> <40854a43$1@newsgroups.borland.com> Subject: Re: CreateBlobStream Date: Tue, 20 Apr 2004 15:17:35 -0500 Lines: 85 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 65.41.241.125 Message-ID: <40858559$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1082492249 65.41.241.125 (20 Apr 2004 13:17:29 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail