cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
anom217
Level 8

ADO Stored Procedure - Help

I have an InstallScript custom action where I'm trying to execute a stored procedure that has an out parameter. I'm using ADO to accomplish this. This is what I have so far.


set oConn = CreateObject("ADODB.Connection");

/* I open the connection string using the Oracle ODBC driver. I've tested it and am able to execute select queries off of it and get results, so I know it works. */

set oCommand = CreateObject("ADODB.Command");
oCommand.ActiveConnection = oConn;
oCommand.CommandType = AD_CMD_STORED_PROC;
oCommand.CommandText = "myStoredProcedureName";
set oParams = oCommand.Parameters;
set oParam1 = oCommand.CreateParameter("myParam", AD_VARIANT, AD_PARAM_OUTPUT, 10);
oParams.Append(oParam1);
oCommand.Execute;
szResult = oParam1.Value;


So my stored procedure has a varchar2 out parameter, and I want to get that value back after executing the stored procedure. I get an error after trying the Execute method where it says "Parameter type is not supported". I think this is in reference to the use of adVariant for VARCHAR2. I see a note saying ADO doesn't support adVariant, but that's what maps to Oracle VARCHAR2. I've tried adVarChar instead of adVariant, but then I get a generic error message instead.

Can anyone help me with the syntax for making this stored procedure call? There isn't much guidance out there for doing this in InstallShield. Thanks.
Labels (1)
0 Kudos
(1) Reply
anom217
Level 8

After a lot of testing with some other stored procedures I created, I determined the data type for the number was incorrect. It should be adNumeric.
0 Kudos