TADOQuery runtime parameter list regeneration generates error adErrInvalidParamInfo
i have a report (Report Builder Pro 6.03) that works perfectly with design
time properties.
The TADOQuery.SQL is filled in.
Design time TADOQuery.Parameters, have been created with correct properties.
The TADOQuery.ParamCheck is set to True to force a regeneration of the
parameters when the SQL is changed. The report works fine if you don't
replace the SQL at runtime. We need to replace the SQL at runtime because
of different backends.
When i replace the SQL at runtime with the identical SQL.
I receive an error message:
"Parameter object is improperly defined. Inconsistent or incomplete
information was provided"
This is ADO Error adErrInvalidParmInfo indicating the parameters were not
recreated with all the correct properties. If I shut off the ParamCheck
property to inhibit parameter recreation, I get SQL syntax errors as it
tries to interpret :parameters
Does anyone know of a solution, or another news thread that might discuss
issues of this nature.
Thanks.
time properties.
The TADOQuery.SQL is filled in.
Design time TADOQuery.Parameters, have been created with correct properties.
The TADOQuery.ParamCheck is set to True to force a regeneration of the
parameters when the SQL is changed. The report works fine if you don't
replace the SQL at runtime. We need to replace the SQL at runtime because
of different backends.
When i replace the SQL at runtime with the identical SQL.
I receive an error message:
"Parameter object is improperly defined. Inconsistent or incomplete
information was provided"
This is ADO Error adErrInvalidParmInfo indicating the parameters were not
recreated with all the correct properties. If I shut off the ParamCheck
property to inhibit parameter recreation, I get SQL syntax errors as it
tries to interpret :parameters
Does anyone know of a solution, or another news thread that might discuss
issues of this nature.
Thanks.
This discussion has been closed.
Comments
I tried a simple test and replaced a parameterized query with the same one
using SQL Server and the Northwind demo database and found no problem.
Below is a link to the test project I created. Let me know if you are able
to create the issue using this example.
http://www.digital-metaphors.com/SQLServerTest.zip
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com