Article View: borland.public.cppbuilder.database.ado
Article #2334Re: Using ADO without without the visual controls
From: Viatcheslav V. Vassiliev
Date: Mon, 25 Aug 2003 05:59
Date: Mon, 25 Aug 2003 05:59
55 lines
2721 bytes
2721 bytes
You create TADOConnection object as well as any TComponent - you should specify Owner, it can be NULL. TADOConnection * conn = new TADOConnection(NULL); //Your code here delete conn; Do not forget to initialize/unitialize COM - it is necessary in non-main thread, call CoInitialize(NULL); //Your code here CoUninitialize(); ---------------------------------------------------------------- Regards, Viatcheslav V. Vassiliev http://www.oledbdirect.com The fastest way to access MS SQL Server, MS Jet (MS Access) and Interbase (through OLEDB) databases. "Claudio Andre Heckler" <Claudio.Heckler@flexint.com> �������/�������� � �������� ���������: news:3f492a05$1@newsgroups.borland.com... > Hi folks! I'm very new to CBuilder (not to programming > though), so beware of the newbie :) > > I need to access data using ADO, and I already figured out > how to do just about everything using the visual controls > (Connection, Data Set and Data Source) > > But, (and there's always a "but") I need to be able to do > this without using the visual controls, that is, all on a > class unit, no form. Not even a hidden form that I never > display ;) > > Since the controls don't expose a public creator, this won't > cut it: > > TADOConnection *oConn = new TADOConnection::TADOConnection(); > > Any ideas? I tried the help and sample code, both came > to nothing. And in searching Google I was just expecting > to get a "won't you give up already?" result sometime :)) > > Any help is very appreciated! > > Thanks, > > Claudio > >
Technical Details
Message-ID:
<3f49a64c@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-09!supernews.com!wn14feed!worldnet.att.net!199.45.49.37!cyclone1.gnilink.net!in.100proofnews.com!in.100proofnews.com!news02.tsnz.net!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<3f492a05$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: 10698b,9d019057c5c74195 X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2003-08-24 23:06:36 PST From: "Viatcheslav V. Vassiliev" <support@oledbdirect.com> Newsgroups: borland.public.cppbuilder.database.ado References: <3f492a05$1@newsgroups.borland.com> Subject: Re: Using ADO without without the visual controls Date: Mon, 25 Aug 2003 09:59:09 +0400 Lines: 57 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 213.247.201.57 Message-ID: <3f49a64c@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1061791308 213.247.201.57 (24 Aug 2003 23:01:48 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!wn14feed!worldnet.att.net!199.45.49.37!cyclone1.gnilink.net!in.100proofnews.com!in.100proofnews.com!news02.tsnz.net!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail