🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #3065

MS SQL Server 2000 BLOB

#3065
From: Sergey Muschin
Date: Thu, 09 Jan 2003 15:24
29 lines
1855 bytes
Hi Everyone!

I'm trying to update BLOB field on MS SQL Server 2000 by means of ADO, but
BLOB field ("Image") stays empty.
I'm out of any ideas! What am I doing wrong????

  Graphics::TBitmap *Bitmap1 = new Graphics::TBitmap();

  ..................

  ADOConnection1->Open("uid","pwd");
  ADODataSet1->Filter = "id=1";
  ADODataSet1->Filtered = true;
  ADODataSet1->Open();

  ADODataSet1->Edit();
  ADODataSet1->FieldValues["label"]="test update"; // to make sure, I can
update table (and it works)
 TStream *pStream =
ADODataSet1->CreateBlobStream(ADODataSet1->FieldByName("Image"),bmReadWrite)
;
  Bitmap1->SaveToStream(pStream);
  ADODataSet1->Post();

  ADODataSet1->Close();
  ADOConnection1->Close();

  //delete pStream;
  delete Bitmap1;
Technical Details
Message-ID: <3e1d94c1$2@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!38.144.126.75.MISMATCH!feed1.newsreader.com!newsreader.com!rip!c03.atl99!news.webusenet.com!news02.tsnz.net!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,f39b9807fe2a389c,start
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2003-01-09 07:40:48 PST
Reply-To: "Sergey Muschin" <sergey.muschin@tonservices.com>
From: "Sergey Muschin" <sergey.muschin@tonservices.com>
Newsgroups: borland.public.cppbuilder.database.ado
Subject: MS SQL Server 2000  BLOB
Date: Thu, 9 Jan 2003 08:24:45 -0700
Lines: 32
Organization: Flying J
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: 204.110.225.254
Message-ID: <3e1d94c1$2@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1042126017 204.110.225.254 (9 Jan 2003 07:26:57 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!38.144.126.75.MISMATCH!feed1.newsreader.com!newsreader.com!rip!c03.atl99!news.webusenet.com!news02.tsnz.net!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail