Implicit conversion from data type sql_variant to int error
Posted: Tue 07 Dec 2010 03:17
Hi,
I try to execute stored procedure with output parameter.
var UniCommand : TUniSql;
begin
UniCommand.ParamCheck := True
UniCommand.SQL.Text := 'EXEC A_STOREDPROC_NAME 0,:IPAR OUTPUT';
for i := 0 to UniCommand.Params.Count-1 do
UniCommand.Params.ParamType := ptInputOutput; // Direction := pdOutput;
UniCommand.Prepare;
UniCommand.Execute;
end;
I get "Implicit conversion from data type sql_variant to int is not allowed. Use CONVERT function to run this query".
I did not get this error if I use AdoCommand.
How to solve this problem.
Thanks
Tugrul
I try to execute stored procedure with output parameter.
var UniCommand : TUniSql;
begin
UniCommand.ParamCheck := True
UniCommand.SQL.Text := 'EXEC A_STOREDPROC_NAME 0,:IPAR OUTPUT';
for i := 0 to UniCommand.Params.Count-1 do
UniCommand.Params.ParamType := ptInputOutput; // Direction := pdOutput;
UniCommand.Prepare;
UniCommand.Execute;
end;
I get "Implicit conversion from data type sql_variant to int is not allowed. Use CONVERT function to run this query".
I did not get this error if I use AdoCommand.
How to solve this problem.
Thanks
Tugrul