TADODataset.Parameters.Refresh results in incorrect parameter names
From: Jim (iambod_at_newsguy.com)
Date: 11/17/03
- Next message: Eli Stein: "progress of insert query"
- Previous message: aubar: "ORA-937 when using parameters"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 17 Nov 2003 10:58:40 -0400
Has anyone else seen this oddity (or am I just doing something
stupid?)
I am changing the CommandText of a TADODataset at runtime after
rebuilding the SQL to change the parameters.
So, for example, I assign the following SQL:
select [CODE], [DESCRIPTION]
from [tblCODES]
where ([CONTEXT] = :CONTEXT)
and ([HIDE] = 0)
After assigning .CommandText, I call .Parameters.Refresh
Now at this point, Parameters.Count = 1, but Parameters[0].Name =
'Param1', not 'CONTEXT' as it should be, which causes problems later
since the parameters are referenced by name (being runtime dependent)
... any suggestions?
The dataset is connected using the SQLOLEDB provider (MDAC 2.71) to
SQL2K
Jim
- Next message: Eli Stein: "progress of insert query"
- Previous message: aubar: "ORA-937 when using parameters"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|