Page 1 of 1

Stored procedure with bigint input-output parameter (type map error?)

Posted: Wed 17 Aug 2005 12:36
by Paul Overbeek
I'm calling a stored procedure with the following interface:

Code: Select all

CREATE  PROCEDURE Procname (@Paramname bigint Output)
In Delphi I create a TSQLDataset. After setting CommandType to ctSoredProcedure and CommandText to 'Procname', I inspect the automaticly created parameter. It's type is ftBCD. I think this is correct, though a bit strange.

Using the MS profiler, I can see that the statement for executing this stored procedure, that is sent to SQL Server, declares my parameter as varchar(67). When querying the resulting value, it is wrongly interpreted (type casted) as a BCD value in Delphi. (ie. a value returned by the stored procedure was '4300000455' (correct) and after typecasting the buffer containing this value was interpreted as 3.303)

I discovered that this problem does not occur when I use an older dbexpsda.dll version 1.84.0.0. That version declares my parameter with type money instead of varchar(67). In this case the typecast works fine.

If this is a bug of the dbExpress driver then I would like to see this fixed. If i'ts not a bug then what am I doing wrong :?

I'm using:
- Delphi 7
- dbExpress driver for SQL Server 2.50.5.0
- MS SQL Server 2000 SP3a

Thanks![/b]

Posted: Wed 17 Aug 2005 12:54
by Paul
We got your request and now examines the problem. As soon as we solve the problem, we'll let you know.

Posted: Thu 25 Aug 2005 12:35
by Ikar
Thank you for information.
We reproduced your problem and fixed it. This fix will be included in the next DbxSda build. It will be available in about one month. Please look forward for announcments at the forum

Posted: Tue 06 Sep 2005 11:25
by Paul Overbeek
Thanks