Article View: borland.public.cppbuilder.database.ado
Article #2790Re: storing / retrieving images in a database
From: lance
Date: Mon, 17 Mar 2003 13:22
Date: Mon, 17 Mar 2003 13:22
32 lines
1934 bytes
1934 bytes
the code actually works
the Assign(NULL) seems to be equivilent to
Value = Null();
comments as to which is better?
>>cmdText = "SELECT * FROM Picture ";
usually I don't do this , this was a demo program
>> ADOQuery->Open();
>> ADOQuery->Active = true;
had an issue with this in the past
now I usually use a dataset for SELECTs
and ExecSQL() for INSERTs etc.
>You check IsBlob() after casting to TBlobField.
>You may want to use TField*
>myBlob = ..., then check IsBlob().
>Check also for IsNull. You may want to
>clear picture if not IsBlob or IsNull.
the IsBlob was just a sanity check
you are right about the IsNull (I should)
I do a Image1->Picture = NULL first though
> char* temp = new char[MAX_PATH];
this was left over from something else,
forgot to delete it here
Technical Details
Message-ID:
<3e75cc26$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!c03.atl99!news.webusenet.com!news02.tsnz.net!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<3e755596$1@newsgroups.borland.com> <3e757209@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,2fc3d06c50d0e4ba X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2003-03-17 05:37:56 PST From: "lance" <palat_l@tdipower.com> Sender: "lance" <palat_l@tdipower.com> Reply-To: "lance" <palat_l@tdipower.com> Subject: Re: storing / retrieving images in a database Newsgroups: borland.public.cppbuilder.database.ado X-User-Info: 206.137.18.242 206.137.18.242 References: <3e755596$1@newsgroups.borland.com> <3e757209@newsgroups.borland.com> NNTP-Posting-Host: 207.105.83.65 Message-ID: <3e75cc26$1@newsgroups.borland.com> Date: 17 Mar 2003 05:22:46 -0800 X-Trace: newsgroups.borland.com 1047907366 207.105.83.65 (17 Mar 2003 05:22:46 -0800) Lines: 35 Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!c03.atl99!news.webusenet.com!news02.tsnz.net!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail