Board index » delphi » Problem with Output Params in MS SQL 7 Stored Procs

Problem with Output Params in MS SQL 7 Stored Procs

Hi,

I'm trying to retrieve some output params from a stored proc in MS SQL 7,
but depending on
the param's type I get diferent results! For instance, when I set
ptInputOutput returns zero, when
ptOutput returns a huge real number, e.g., 8,232E+105.

The output param in the stored proc is decimal(19,2).

Any help would be appreciated...
[]s, Daniel P. Costa

 

Re:Problem with Output Params in MS SQL 7 Stored Procs


Decimal parameters, I think (not too sure), map to a TBCDField.  The BCD
conversion does some erratic things to values.  (I had problems setting and
reading values from decimal parameters in an app I wrote.)  I recommend
making the output parameter in your stored procedure a float parameter, and
read the float parameter as a Object Pascal double type.  I found that to be
very accurate and less painful.

Thanks.
Al

Daniel P. Costa <danielpco...@yahoo.com> wrote in message
news:3ac09c12_1@dnews...

Quote
> Hi,

> I'm trying to retrieve some output params from a stored proc in MS SQL 7,
> but depending on
> the param's type I get diferent results! For instance, when I set
> ptInputOutput returns zero, when
> ptOutput returns a huge real number, e.g., 8,232E+105.

> The output param in the stored proc is decimal(19,2).

> Any help would be appreciated...
> []s, Daniel P. Costa

Other Threads