A
ashishprem
Hi,
I want to connect to a Oracle database located on remote machine and
execute the insert query from the macro but i am getting error related
to session object. I am sending the code, please help me out..
CODE
Dim oconn As ADODB.Connection
Set oconn = New Connection
Dim cmd As ADODB.Command
Set cmd = New Command
oconn.ConnectionString = "Driver={Oracle ODBC Driver};" & _
"Dbq=alf;" & _
"Uid=system;" & _
"Pwd=manager1"
cmd.ActiveConnection = oconn
cmd.CommandText = "insert into zzz_ashish values('YYY','22')"
cmd.Execute
I want to connect to a Oracle database located on remote machine and
execute the insert query from the macro but i am getting error related
to session object. I am sending the code, please help me out..
CODE
Dim oconn As ADODB.Connection
Set oconn = New Connection
Dim cmd As ADODB.Command
Set cmd = New Command
oconn.ConnectionString = "Driver={Oracle ODBC Driver};" & _
"Dbq=alf;" & _
"Uid=system;" & _
"Pwd=manager1"
cmd.ActiveConnection = oconn
cmd.CommandText = "insert into zzz_ashish values('YYY','22')"
cmd.Execute