Hi,
I have a query text, where the parameters have already been replace with question marks:
select ?, ?, ?
and I have also orderer list of the corresponding values in array of variant.
How do i execute such query?
I tried TMSConnection.ExecSQL, but this method expects named parameters in the sql text (:param1, :param2 etc.)
Thanks, Ludek.
execute sql with parameters already replaced
Re: execute sql with parameters already replaced
For successful execution of the specified query, you should modify it to the following:
SDAC generates parameters automatically, using the SQL query text.
Code: Select all
select :p1, :p2, :p3Re: execute sql with parameters already replaced
... and sdac again parses all the params and changes it internally again back to ?, ?, ?...
I hoped, i could save this superfluous parsing and replacing using some low-level access, especially when the query contains 2000 parameters...
I hoped, i could save this superfluous parsing and replacing using some low-level access, especially when the query contains 2000 parameters...
Re: execute sql with parameters already replaced
When parsing a query, we replace not just all the :ParamName entries with ?, but also create an internal structure for using parameters. So you can't use a query, in which parameter names are replaced with ?.