CDurkin
14 years agoContributor
CreateADOStoredProc and a adVarChar Parameter
I am trying to call a Oracle Stored proc which returns a VarChar. But it seems to be having trouble recognising the type "adVarChar".
I get the following error:
"Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another"
My code is something like below. If I change it to "ftFixedChar" it seems to work.
How do I get it working for Oracles' VARCHAR2.
Thanks
Chris
function CreatingStoredProcedure()
{
var SProc;
SProc = ADO.CreateADOStoredProc();
SProc.ConnectionString = "....
SProc.ProcedureName = "....
// Adding a return parameter
SProc.Parameters.AddParameter();
SProc.Parameters.Items(0).name = "RETURN_VALUE";
SProc.Parameters.Items(0).DataType = adVarChar; <<< Complains about this line
SProc.Parameters.Items(0).Size = 255;
SProc.Parameters.Items(0).Direction = adParamReturnValue;
SProc.Parameters.Items(0).Value = null;
I get the following error:
"Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another"
My code is something like below. If I change it to "ftFixedChar" it seems to work.
How do I get it working for Oracles' VARCHAR2.
Thanks
Chris
function CreatingStoredProcedure()
{
var SProc;
SProc = ADO.CreateADOStoredProc();
SProc.ConnectionString = "....
SProc.ProcedureName = "....
// Adding a return parameter
SProc.Parameters.AddParameter();
SProc.Parameters.Items(0).name = "RETURN_VALUE";
SProc.Parameters.Items(0).DataType = adVarChar; <<< Complains about this line
SProc.Parameters.Items(0).Size = 255;
SProc.Parameters.Items(0).Direction = adParamReturnValue;
SProc.Parameters.Items(0).Value = null;