🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Calling TADOQuery indirectly

#5851
From: Alexei Karas
Date: Fri, 02 Feb 2001 07:42
72 lines
2879 bytes
Tiago,

you may have a look at "Creating Web Applications with C++Builder 4 and 5"
article at
http://www.cbuilderzine.com/features/2000/06/cb200006ne_f/cb200006ne_f.asp
It's quite good, as for me and may be of some use for you...

   Alexei.


"Tiago Quadra" <pinz@telecomrio.com.br> wrote in message
news:Pine.LNX.4.21.0102011223150.16958-100000@firewall.telecomrio.com.br...
> 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: <3a7a662d_2@dnews>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!news.tele.dk!194.213.69.151!news.algonet.se!algonet!newsfeed1.uni2.dk!newssuck.uni2.dk!bornews.borland.com!dnews!212.109.63.210
References: <Pine.LNX.4.21.0102011223150.16958-100000@firewall.telecomrio.com.br>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,29eee7354965f0a
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2001-02-01 23:52:39 PST
From: "Alexei Karas" <nospam_AlexKaras_thatsextraaswell@hotmail.com>
Newsgroups: borland.public.cppbuilder.database.ado
References: <Pine.LNX.4.21.0102011223150.16958-100000@firewall.telecomrio.com.br>
Subject: Re: Calling TADOQuery indirectly
Date: Fri, 2 Feb 2001 09:42:32 +0200
Lines: 74
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: 212.109.63.210
Message-ID: <3a7a662d_2@dnews>
X-Trace: 1 Feb 2001 23:47:57 -0800, 212.109.63.210
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!news.tele.dk!194.213.69.151!news.algonet.se!algonet!newsfeed1.uni2.dk!newssuck.uni2.dk!bornews.borland.com!dnews!212.109.63.210