We're having trouble getting stored procs to execute on an OS/390 v5
db2 box using VB.
With the following code, we DO not receive any errors (checked the
connection object as well), but the Stored Proc does Not execute.
intRetVal returns as -1.
The Stored Proc executes correctly on the OS/390 box. We have tried
various username/passwords with different levels of access and still
the same - the SP will not execute and we do not error out. We've
tried different SP's, some with parameters, some without and no
Any comments or suggestions would be appreciated.
What we have VB6, SP5, ADO 2.6, Win98 SE
DB2 Connect version 6.1 (7.x would not even let us connect, 6.1 does)
MS OLE DB Provider for ODBC Drivers
OS/390 v 5.1.2 with the stored proc installed and functioning on that
'Begin code snippet
Dim rs As New ADODB.Recordset
Dim intRetVal As Integer
Dim adocx As New ADODB.Connection
Dim parm1 As New ADODB.Parameter
Dim parm2 As New ADODB.Parameter
Dim cmInsert As New ADODB.Command
'Establish the connection string and open the connection
adocx.Open "Provider=MSDASQL;Password=mypassword;Persist Security
Info=True;User ID=myusername;Data Source=myDSN"
cmInsert.CommandType = adCmdStoredProc
cmInsert.CommandText = "SPROC1"
'Setup the input Parameter
Set parm1 = cmInsert.CreateParameter("PVALUE", adVarChar,
adParamInput, 10, "XYX")
'Setup the Output Parameter
Set parm1 = cmInsert.CreateParameter("OVALUE", adVarChar,
adParamOutput, 10, Null)
'execute the SP
Set cmInsert.ActiveConnection = adocx
Set rs = cmInsert.Execute(intRetVal)