Trying to execute a stored procudure in VBA.
(Excel 97).
following is out of a textbook, but does not work - should be pretty close.
Does not recognize method on dim statments.
Set Con1 = New ADODB.Connection
Dim Cmd1 As New ADODB.Command
Con1.Open "DSN=BD01;UID=PASSWORD;PWD=xxxx;"
Cmd1.CommandText = "{CALL QGPL.MYPROCTEST (?)}"
Cmd1.Execute
JobNum = Cmd1.Parameters(0).Value
Set Cmd1 = Nothing
Con1.Close
Set Con1 = Nothing
End Sub
Does Excel 97 suppport ADO technology
If can be done via sql, that's fine.
(Excel 97).
following is out of a textbook, but does not work - should be pretty close.
Does not recognize method on dim statments.
Set Con1 = New ADODB.Connection
Dim Cmd1 As New ADODB.Command
Con1.Open "DSN=BD01;UID=PASSWORD;PWD=xxxx;"
Cmd1.CommandText = "{CALL QGPL.MYPROCTEST (?)}"
Cmd1.Execute
JobNum = Cmd1.Parameters(0).Value
Set Cmd1 = Nothing
Con1.Close
Set Con1 = Nothing
End Sub
Does Excel 97 suppport ADO technology
If can be done via sql, that's fine.