Article View: borland.public.cppbuilder.database.ado
Article #5846Calling TADOQuery indirectly
From: Tiago Quadra
Date: Thu, 01 Feb 2001 14:34
Date: Thu, 01 Feb 2001 14:34
59 lines
2277 bytes
2277 bytes
Hi, First of all, sorry about my bad english. I'm trying to do a cgi in C to run in IIS, so, it's a console application, and I have to use Borland C++. The cgi should recv data from a web page and record it into a SQL Database (MS-SQL). I'm trying do to it with ADO. I create one TADOConnection, one TADOQuery and two TComponent. --------------- TADOConnection *ADOConnection1; TADOQuery *ADOQuery1; TComponent F_ADOQuery; TComponent F_ADOConnection; --------------- The ADOConnection I started in a function called Abre_DB(), that runs from main(). -------------- CoInitialize(NULL); ADOConnection1 = new TADOConnection(F_TADOConnection); ADOConnection1->ConnectionString = "..." ADOConnection1->LoginPrompt = false; ADOConnection1->Open(); .... --------------- It's fine, works ok. But when i try to start ADOQuery1 in a function called Grava_DB(), that runs from main() too, after the Abre_DB(), my program crash. --------------- ADOQuery1 = new TADOQuery(F_TADOQuery); --------------- I don't know what do to... Thanks for everyone.. and sorry again about my bad english. /* * Tiago Quadra * - Tecnico em Rede/Programador - Telecom Brasil (www.telecombrasil.com) * tiago@telecomrio.com.br * ICQ UIN 29047848 * * - pindulim/pinz on BrasNET IRC Network (irc.brasnet.org) * #rio+de21, #so_feias, #linux * pindulim@brasnet.org ou pinz@telecomrio.com.br * ICQ UIN 1077149 */
Technical Details
Message-ID:
<Pine.LNX.4.21.0102011223150.16958-100000@firewall.telecomrio.com.br>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!isdnet!newsfeed.direct.ca!look.ca!feed-out.newsfeeds.com!newsfeeds.com!feed.newsfeeds.com!newsfeeds.com!news.bnb-lp.com!bornews.borland.com!dnews!ns1!pinzShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,29eee7354965f0a,start X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2001-02-01 06:41:47 PST Newsgroups: borland.public.cppbuilder.database.ado Date: Thu, 1 Feb 2001 12:34:46 -0200 From: Tiago Quadra <pinz@telecomrio.com.br> Subject: Calling TADOQuery indirectly Message-ID: <Pine.LNX.4.21.0102011223150.16958-100000@firewall.telecomrio.com.br> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII NNTP-Posting-Host: 200.197.192.98 X-Trace: 1 Feb 2001 06:35:19 -0800, 200.197.192.98 Lines: 60 Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!isdnet!newsfeed.direct.ca!look.ca!feed-out.newsfeeds.com!newsfeeds.com!feed.newsfeeds.com!newsfeeds.com!news.bnb-lp.com!bornews.borland.com!dnews!ns1!pinz