
Error calling Oracle store procedures using ADO
I have VB 6 code calling SP in Oracle 8.i
The code used to work until recently I started to get strange errors.
One of every 5-10 calls produce "Unspecified error"
I tried different drivers -Oracle OLEDB, Microsoft OLEDB for Oracle,
Microsoft ODBC for Oracle but it did not help, I still getting errors with
different drivers
The Oracle support could not help, the only thing we found that error is
risen by ADODB Execute statement but before control goes inside store
procedure.
Any help or suggestion would be greatly appreciated
Here is a list of errors produced by different drivers:
******
09/06/2001 10:22:42 am : OraOLEDB ERROR
User: IUSR_MP-DEV-WEB2
Virtual Directory: Deltabase_Web
Procedure: DeltabaseUtil::OracleSecurity::GetUsersRoles()
Error Number: -2147467259
Error Description: Unspecified error
Error Source: OraOLEDB
******
09/06/2001 10:45:27 am : Microsoft OLE DB Provider for Oracle ERROR
User: IUSR_MP-DEV-WEB2
Virtual Directory: Deltabase_Web
Procedure: DeltabaseUtil::OracleSecurity::GetUsersRoles()
Error Number: -2147217900
Error Description: PL/SQL procedure name is invalid.
Error Source: Microsoft OLE DB Provider for Oracle
******
09/06/2001 10:48:30 am : Microsoft OLE DB Provider for ODBC Drivers ERROR
User: IUSR_MP-DEV-WEB2
Procedure: DeltabaseUtil::OracleSecurity::GetUsersRoles()
Error Number: -2147217900
Error Description: [Microsoft][ODBC driver for Oracle][Oracle]ORA-20004:
Error Source: Microsoft OLE DB Provider for ODBC Drivers
______________________________
Here is an exapmle of VB code I use to call sp:
Dim oCon As ADODB.Connection
Dim oCmd As ADODB.Command
Dim oParam As ADODB.Parameter
Set oCon = New ADODB.Connection
Set oCmd = New ADODB.Command
oCon.Open "<connection string>"
With oCmd
Set .ActiveConnection = oCon
.CommandType = adCmdStoredProc
.CommandText = "MY_SCHEMA_NAME.MY_PACKAGE_NAME"
Set oParam = .CreateParameter("p_specify_logon", adVarChar, adParamI
nput, 30, UCase(sLogin))
.Parameters.Append oParam
Set oParam = .CreateParameter("p_password", adVarChar, adParamInput,
30, UCase(sLogin))
.Parameters.Append oParam
Set oParam = .CreateParameter("p_message", adVarChar, adParamOutput,
200)
.Parameters.Append oParam
End With
oCmd.Execute
sRetVal = IIf(IsNull(oCmd.Parameters(2).Value), "",
Trim(oCmd.Parameters(2).Value))