01-07-2010, 07:11 PM
Working solution is:
See oCommand.CommandText line for modifications: exec word was removed.
Code:
Dim oConn
Dim oCommand
Set oConn = CreateObject("ADODB.Connection")
Set oCommand = CreateObject("ADODB.Command")
oConn.Open "Driver={Microsoft ODBC for Oracle};Server=myserver.com;Uid=user;Pwd=pwd;"
oCommand.ActiveConnection = oConn
oCommand.CommandText = "STATEMENT"
oCommand.Execute
oConn.Close
See oCommand.CommandText line for modifications: exec word was removed.