Delphi 6 - Data type conversion error, please help
From: Alan (Zoplax_at_gmail.com)
Date: 07/20/04
- Next message: Johnny 5: "Re: teaching a child - console or GUI"
- Previous message: Jud McCranie: "Re: teaching a child - console or GUI"
- Next in thread: Jamie: "Re: Delphi 6 - Data type conversion error, please help"
- Reply: Jamie: "Re: Delphi 6 - Data type conversion error, please help"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 20 Jul 2004 09:08:14 -0700
I have a stored procedure object on a form I've created with Delphi 6.
The stored procedure object uses SOAP to connect to a Microsoft SQL
2000 server.
One of the parameters required by the stored procedure is an Integer
ID variable (let's called it record_ID).
The record_ID numbers appear to have gotten larger than a standard
Integer variable; for example, passing 918888847 as the record_ID
works fine, but passing 7111111297 (one digit longer than the first
one) gives "Error converting data type numeric to int".
What's the best way to fix this?
I've enabled the SQL stored procedure to work by declaring the
record_ID input variable as "bigint" instead of "integer". In Delphi,
the variable there is still a plain "integer", I'm guessing I need to
change the variable type:
myvariable : Cardinal;
...or whatever type is big enough, then pass this to the stored
procedure in Delphi like this:
sp_MySQL_stored_proc.Params.FindParam('record_ID').AsCardinal :=
my_field_value;
Please help, thanks!
- Next message: Johnny 5: "Re: teaching a child - console or GUI"
- Previous message: Jud McCranie: "Re: teaching a child - console or GUI"
- Next in thread: Jamie: "Re: Delphi 6 - Data type conversion error, please help"
- Reply: Jamie: "Re: Delphi 6 - Data type conversion error, please help"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|