Article View: borland.public.cppbuilder.database.ado
Article #831Re: problem with insert/get image in MSSQL2K using ADO & C++ Builder 6
From: Daniel Stevanovic
Date: Mon, 30 May 2005 10:09
Date: Mon, 30 May 2005 10:09
42 lines
2228 bytes
2228 bytes
Thank you.
> Try ms->Seek(0, soFromBeginning) after save.
That was the problem. I figure it out last night.
"Viatcheslav V. Vassiliev" <support@oledbdirect.com> wrote in message
news:429ab7a2$1@newsgroups.borland.com...
> Try ms->Seek(0, soFromBeginning) after save.
>
> //------------------------------------------
> 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)
>
> "Daniel Stevanovic" <danste@neobee.net> �������/�������� � ��������
> ���������: news:429a1002@newsgroups.borland.com...
> > Does anyone knows why this doesn't work ? Please :(
> >
> > table->Insert(); // table: TADOTable
> > ...
> > TMemoryStream *ms=new TMemoryStream();
> > Image1->Picture->Bitmap->SaveToStream(ms); // Image1: TImage
> > component
> > try
> > {
> > ((TBlobField*)table->Fields->Fields[4])->LoadFromStream(ms);
> > }
> > __finally
> > {
> > delete ms;
> > }
> >
> > table->Post();
> >
> >
> >
>
>
Technical Details
Message-ID:
<429ae665@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news2.google.com!proxad.net!212.101.4.254.MISMATCH!solnet.ch!solnet.ch!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<429a1002@newsgroups.borland.com> <429ab7a2$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,cad40e3a9264a12d X-Google-Attributes: gid10698b,public X-Google-Language: ENGLISH,ASCII From: "Daniel Stevanovic" <danste@neobee.net> Newsgroups: borland.public.cppbuilder.database.ado References: <429a1002@newsgroups.borland.com> <429ab7a2$1@newsgroups.borland.com> Subject: Re: problem with insert/get image in MSSQL2K using ADO & C++ Builder 6 Date: Mon, 30 May 2005 12:09:29 +0200 Lines: 44 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1478 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1478 NNTP-Posting-Host: 147.91.175.19 Message-ID: <429ae665@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1117447781 147.91.175.19 (30 May 2005 03:09:41 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news2.google.com!proxad.net!212.101.4.254.MISMATCH!solnet.ch!solnet.ch!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail