I have the following stored procedure in SQL Server 2008 R2:
Code: Select all
CREATE PROCEDURE Test (
@DataIn Numeric(12,4),
@DataOut Numeric(12,4) output
)
as
set @DataOut = @DataIn
Code: Select all
ds := TSQLDataSet.Create(self);
try
ds.SQLConnection := ...
ds.CommandType := ctStoredProc;
ds.CommandText := 'Test';
ds.ParamByName('DataIn').AsCurrency := 5.0;
ds.ExecSQL;
ShowMessage(ds.ParamByName('DataOut').AsString);
finally
ds.Free;
end;
Then I change @DataIn into an output parameter:
Code: Select all
CREATE PROCEDURE Test (
@DataIn Numeric(12,4) Output,
@DataOut Numeric(12,4) output
)
as
set @DataOut = @DataIn
I'm using dbexpsda40.dll version 4.55.0.22 and EnableBCD is set to 'False'.TDBXTypes.DOUBLE value type cannot be accessed as TDBXTypes.BCD value type
When I do exactly the same in Delphi 7, using dbexpsda.dll 4.55.0.22, both situations work fine.