🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

TADORecordset question for Team B

#4595
From: Joe Smith
Date: Fri, 02 Nov 2001 18:16
30 lines
2382 bytes
Here is a question for Team B (or others if they can answer)

We have written a COM object which returns _Recordset* (actually it is an
IDispatch** which in the application gets cast to an _Recordset*).  The COM
object is extremely fast in firing sql cals, populating the _recordset and
returning it to the client (that's why we chose to do it that way instead of
just using TADORecordsets, also we couldn't figure out how to return
TADORecordsets from a com object - our com object is also used by other non
builder apps).  In the builder app, for ease of use, we set the Recordset
property of a TADODataSet to our _Recordset*.  This lets us hook a DBGrid up
to it.

So I have a few questions about this:

1) Is this a safe thing to do? (in the destructor of the form that has the
TADODataSet, I've been calling Release() on the recordset property and then
calling Close() on the recordset.

2)  Lookup fields in the DBGrids pose a problem because you need to set
fields as lookup in the TADODataSet in design time, which doesn't work
because all the fields seem to get wiped out when you set the Recordset
property.  Is there any way to fix this?

3) When trying to use a DBListBox, I can't because the Field property of the
Listbox can't be set unless there are fields in the TADODataSet in design
time, and if you just type a name into the DBListBox's Field property it
won't bind at runtime anyhow, like the DBGrid will.  Is there any way to get
around this?

Thanks.
Technical Details
Message-ID: <3be2e306_1@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!newsfeed.media.kyoto-u.ac.jp!out.nntp.be!propagator-SanJose!in.nntp.be!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,d031df0b31f740ab,start
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2001-11-02 10:17:57 PST
From: "Joe Smith" <Jchapman@cenadex.com>
Newsgroups: borland.public.cppbuilder.database.ado
Subject: TADORecordset question for Team B
Date: Fri, 2 Nov 2001 10:16:48 -0800
Lines: 32
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
NNTP-Posting-Host: 24.67.186.198
Message-ID: <3be2e306_1@dnews>
X-Trace: dnews 1004724998 24.67.186.198 (2 Nov 2001 10:16:38 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!newsfeed.media.kyoto-u.ac.jp!out.nntp.be!propagator-SanJose!in.nntp.be!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews