🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Binary into BLOB

#5134
From: Max Krok
Date: Fri, 20 Jul 2001 17:08
25 lines
1318 bytes
Can any one give the short full example how to read a file in binary mode
and then load data into blob field of MS SQL or whatever it may be server
using ADO components

I saw this
++++++++++++++++++++++++
int S;

ADOTable1->Edit();
TADOBlobStream *BS = new TADOBlobStream(ADOTable1->Fields->Fields[1],
bmWrite);
try
{
  S = Memo1->GetTextLen() + 1;
  char *P = new char[S];
  Memo1->GetTextBuf(P, S);
  BS->Write(P.c_str(), P.Length());
}
__finally
{
  delete BS;
}

But it is from Memo and not in binary mode... Please help
Max Krok
Technical Details
Message-ID: <3b58657f_2@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!sn-xit-03!supernews.com!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,e339ba58c9f67711,start
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2001-07-20 10:12:40 PST
From: "Max Krok" <abon@tvcom.ru>
Newsgroups: borland.public.cppbuilder.database.ado
Subject: Binary into BLOB
Date: Fri, 20 Jul 2001 21:08:23 +0400
Lines: 27
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
NNTP-Posting-Host: 194.87.73.250
Message-ID: <3b58657f_2@dnews>
X-Trace: dnews 995648895 194.87.73.250 (20 Jul 2001 10:08:15 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!sn-xit-03!supernews.com!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews