🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

TADOCommand - changing CommandText ineffective

#5894
From: John R Young
Date: Wed, 03 Jan 2001 14:33
17 lines
1449 bytes
I am Using a TADOCommand to talk to MS SQL Server 7.0 (cppb 5)
At design-time, CommandText is "insert into xxx (column,....) values
(:parameter, ...."
I use a combobox to select target table name & replace "xxx" by, say, "yyy".
Inspecting CommandText with debugger immediately before the Execute()
statement
shows "insert into yyy (column,....) values :parameter, ....", as expected,
but the
insert goes into table xxx !!!??? Why? and what is the remedy?

Notes...
The TADOCommand is not connected through a TADOConnection.
It has Prepared=true (at design), and is not explicitly unprepared and
reprepared.

Most grateful for any explanation.
John Young
Technical Details
Message-ID: <92vd7h$sph8@bornews.inprise.com>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!news.tele.dk!130.133.1.3!fu-berlin.de!news.bnb-lp.com!bornews.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,f3a64747c836a201,start
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2001-01-03 06:39:16 PST
From: "John R Young" <john.young@bbsrc.ac.uk>
Newsgroups: borland.public.cppbuilder.database.ado
Subject: TADOCommand - changing CommandText ineffective
Date: Wed, 3 Jan 2001 14:33:07 -0000
Organization: Another Netscape Collabra Server User
Lines: 20
Message-ID: <92vd7h$sph8@bornews.inprise.com>
NNTP-Posting-Host: pc0417.irad.bbsrc.ac.uk
X-Newsreader: Microsoft Outlook Express 4.72.3612.1700
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3612.1700
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!news.tele.dk!130.133.1.3!fu-berlin.de!news.bnb-lp.com!bornews.borland.com!not-for-mail