Page 1 of 1
Changing OraQuery.SQL.text at runtime and incorrect param DataType ftUnknown after...
Posted: Thu 12 Jul 2007 18:59
by Alexys
Then I try to change
TOraQuery.SQL.text at runtime (for execute query with stored procedure),
I can access any parameter of this procedure, it's correct.
But type of any parameter is ftUnknown, it's not correst!
However, in design-time, then I put my SQL into TOraQuery, parameter's DataType recognized correctly.
How can I get correct DataType of parameters after changing SQL at runtime?
Thanks.
Posted: Fri 13 Jul 2007 10:59
by Plash
Please specify whether the SQL property of the TOraQuery component is empty before you are changing it, or it already contains another query that has the same parameters with correct data type.
Posted: Fri 13 Jul 2007 11:42
by Alexys
Please specify whether the SQL property of the TOraQuery component is empty before you are changing it, or it already contains another query that has the same parameters with correct data type.
I try with empty SQL and not-empty before changing, any case - DataType of all parameters is ftUnknown.
Posted: Mon 16 Jul 2007 09:15
by Plash
To make ODAC automatically detect data type for stored procedure parameters, you should use the TOraStoredProc component.
When you set the SQL property for the TOraQuery component, the DataType property for all parameters is set to ftUnknown. But DataType of parameters that was present in previous SQL text remains unchanged.
Please provide us a sample demonstrating the problem: value of the SQL property before and after the change, and data types of parameters before and after the SQL property has been changed.
I understand my mistake.
Posted: Mon 16 Jul 2007 11:16
by Alexys
Sorry.
I understand my mistake.
I tried to use PL/SQL block with stored procedure call in TOraQuery SQL, but TOraQuery can’t retrieve DataType of parameters in this case, like TOraStoredProc (may be SELECT ... FROM ALL_ARGUMENTS WHERE ... or any other way).
However, may be it's good to add this functionality to TOraQuery with PL/SQL stored procedure call in the future.
Posted: Wed 18 Jul 2007 11:28
by Plash
We will investigate possibility to add such functionality, but that is hardly to happen in the nearest future.