Article View: borland.public.cppbuilder.database.ado
Article #830Re: problem with insert/get image in MSSQL2K using ADO & C++ Builder 6
From: Viatcheslav V. Vassiliev
Date: Mon, 30 May 2005 06:50
Date: Mon, 30 May 2005 06:50
32 lines
1941 bytes
1941 bytes
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:
<429ab7a2$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!mpls-transit-01.news.qwest.net!38.119.100.82.MISMATCH!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<429a1002@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: "Viatcheslav V. Vassiliev" <support@oledbdirect.com> Newsgroups: borland.public.cppbuilder.database.ado References: <429a1002@newsgroups.borland.com> Subject: Re: problem with insert/get image in MSSQL2K using ADO & C++ Builder 6 Date: Mon, 30 May 2005 10:50:12 +0400 Lines: 34 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2527 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 X-RFC2646: Format=Flowed; Original NNTP-Posting-Host: 85.93.138.132 Message-ID: <429ab7a2$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1117435810 85.93.138.132 (29 May 2005 23:50:10 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!mpls-transit-01.news.qwest.net!38.119.100.82.MISMATCH!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail