In Delphi, how to create a OracleParameter with a integer value?
Posted: Mon 12 Feb 2007 17:22
Hi,
I'm working in Delphi 2006, and I would like to call a Oracle stored procedure that takes two parameters. The 1st one is a string and the 2nd one an integer.
For the string one, there's no problem, I do :
Now for the integer paramter, I don't know how to pass it, because the value must be of type TObject and Integer is a primitive type, not a class.
So the following code fails, and the compiler tells that Object and Integer are incompatible types :
I've asked a Delphi programmer here, and he told me that integer is a primitive type, and there is no wrapper class that inherits from TObject.
So if you have a suggestion about how to create a OracleParameter with an integer value in Delphi, thank you to tell me.
Thanks.
Adriano
I'm working in Delphi 2006, and I would like to call a Oracle stored procedure that takes two parameters. The 1st one is a string and the 2nd one an integer.
For the string one, there's no problem, I do :
Code: Select all
command.Parameters.Add('p_mystring', mystring);So the following code fails, and the compiler tells that Object and Integer are incompatible types :
Code: Select all
command.Parameters.Add('p_myInteger', OracleDbType.Integer).Value := myInteger;So if you have a suggestion about how to create a OracleParameter with an integer value in Delphi, thank you to tell me.
Thanks.
Adriano