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

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for SQL Server in Delphi and C++Builder
Post Reply
Paul Overbeek

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

Post by Paul Overbeek » Wed 17 Aug 2005 12:36

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]

Paul
Posts: 725
Joined: Thu 28 Oct 2004 14:06

Post by Paul » Wed 17 Aug 2005 12:54

We got your request and now examines the problem. As soon as we solve the problem, we'll let you know.

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Thu 25 Aug 2005 12:35

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

Paul Overbeek

Post by Paul Overbeek » Tue 06 Sep 2005 11:25

Thanks

Post Reply