Thread View: borland.public.cppbuilder.database.ado
2 messages
2 total messages
Started by Tiago Quadra
Thu, 01 Feb 2001 14:34
Calling TADOQuery indirectly
Author: 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 */
Re: Calling TADOQuery indirectly
Author: Alexei Karas
Date: Fri, 02 Feb 2001 07:42
Date: Fri, 02 Feb 2001 07:42
72 lines
2879 bytes
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 > */ >
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads