🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Creating A ADO Component at Runtime

#2990
From: Victor Cazacov
Date: Thu, 16 Jan 2003 11:44
24 lines
1880 bytes
 TVd> Is it possible to create a ADO component at runtime ? I need to do
 TVd> this in a app I'm developing.

Example of creating TADOQuery in runtime:

  TADOQuery*  qUpdate;

  qUpdate = new TADOQuery(this);
  qUpdate->Connection = ADOConnection1;
  qUpdate->SQL->Clear();
  qUpdate->SQL->Add("SELECT id, w_id, wrt_id, flag_id FROM  qq_lastupdate "
                                         "WHERE id = :id ");
  qUpdate->LockType = ltReadOnly;
  qUpdate->Parameters->ParamByName("id")->DataType = ftInteger;
  qUpdate->Parameters->ParamByName("id")->Value = ID;

  for (qUpdate->Open(); !qUpdate->Eof; qUpdate->Next())
 {
    ... // Your code
 }
qUpdate->Close();

--
Victor
Technical Details
Message-ID: <3e269b75$1@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-08!supernews.com!64.152.100.70.MISMATCH!sjc70.webusenet.com!c03.atl99!news.webusenet.com!news02.tsnz.net!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <3e267ed2$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,10c29d682611b25e
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2003-01-16 03:54:33 PST
Reply-To: "Victor Cazacov" <victor@kazakov.net>
From: "Victor Cazacov" <victor@kazakov.net>
Newsgroups: borland.public.cppbuilder.database.ado
References: <3e267ed2$1@newsgroups.borland.com>
Subject: Re: Creating A ADO Component at Runtime
Date: Thu, 16 Jan 2003 12:44:40 +0100
Lines: 26
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
X-Comment-To: Tom Van den Bon
FL-Build: Fidolook Express 2001 UIExt. BuildID: 3BC00FAD (7/10/2001 10:17:49).
NNTP-Posting-Host: 195.143.24.227
Message-ID: <3e269b75$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1042717557 195.143.24.227 (16 Jan 2003 03:45:57 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!64.152.100.70.MISMATCH!sjc70.webusenet.com!c03.atl99!news.webusenet.com!news02.tsnz.net!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail