Article View: borland.public.cppbuilder.database.ado
Article #3628Re: Cbuilder4 & Excell97
From: Shaun
Date: Sun, 21 Jul 2002 14:00
Date: Sun, 21 Jul 2002 14:00
49 lines
2699 bytes
2699 bytes
Heres the link to the tutorial.
http://cslp.comp.nus.edu.sg/luakt/programming/Using%20ADO%20with%20Borland%2
0C++%20Builder%204.htm
Things to note, as far as I am aware if you have CBuilder5 and later you
have components at your disposal to use. [Ado Express] I only have Cbuilder
4 so I had to do it with code.
Also when you import the type libraries check the headers for syntax, my
TLB's had underscores added to some of the names ie, in the Tut it says
FieldPtr p = rs->Fields->get_Item(TVariant("CITY"));
my code would only compile with
Field* p = rs->Fields_->get_Item(TVariant("CITY"));
notice the difference
FieldPtr = Field* and Fields = Fields_
I admit, before I wrote the program I needed I never had worked with adodb
before, or automation.
Some other references I used are the ObjectModel for adodb 2.1 [This Helps
put it into perspective]
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaxctrl/ht
ml/ado_objm.asp
or look up Kenneth Lassesen at the microsoft site.
and also I found this helpful
http://www.connectionstrings.com/
Most of the info I read on Vb is pretty much the same because it is a com
object and you use the Type Library.
I wrote the application in CBuilder and VB, it worked just as well in VB as
in CBuilder, except I had to write a binary/insertion sort for the listbox
on VB. My program fills a list box from a 40000 line excel spreadsheet, the
VB version actually fills the listbox faster. I am not quite sure why that
is, I would have expected the CBuilder version to be faster.
Hope this helps
regards Shaun
Technical Details
Message-ID:
<3d3aba04$1_1@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed.news2me.com!newsfeed-west.nntpserver.com!hub1.meganetnews.com!nntpserver.com!DirecTVinternet!DirecTV-DSL!news-out.spamkiller.net!propagator2-maxim!propagator-maxim!news-in.spamkiller.net!news02.tsnz.net!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnewsReferences:
<3d210c8e$1_2@dnews> <3d39315d_2@dnews> <3d3a3373_1@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,d7212406486d45a7 X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2002-07-21 07:05:50 PST From: "Shaun" <nospam@nospam.com> Newsgroups: borland.public.cppbuilder.database.ado References: <3d210c8e$1_2@dnews> <3d39315d_2@dnews> <3d3a3373_1@dnews> Subject: Re: Cbuilder4 & Excell97 Date: Mon, 22 Jul 2002 02:00:45 +1200 Lines: 51 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: 202.37.167.75 Message-ID: <3d3aba04$1_1@dnews> X-Trace: dnews 1027258884 202.37.167.75 (21 Jul 2002 06:41:24 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed.news2me.com!newsfeed-west.nntpserver.com!hub1.meganetnews.com!nntpserver.com!DirecTVinternet!DirecTV-DSL!news-out.spamkiller.net!propagator2-maxim!propagator-maxim!news-in.spamkiller.net!news02.tsnz.net!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews