Hi guys, i have finally managed to work out the correct connection strings needed to connect to the server, but i cant get this bit of sql too work what i want it too do is select all the data from the 'table1.tablea' table and insert it into the 'TBL-testTBL' table but when i run the code i get a values missing error pointing to the cnn.Execute line.
any ideas what i am doing wrong?
best regards
stuart
any ideas what i am doing wrong?
Code:
Dim cnn As ADODB.Connection
Set cnn = New ADODB.Connection
Dim rs As ADODB.Recordset
Dim vsql As String
' Open a connection using an ODBC.
cnn.ConnectionString = "UID=userid;PWD=password;DRIVER={Microsoft ODBC for Oracle};" _
& "SERVER=server1;"
cnn.Open
cnn.Execute "INSERT INTO TBL-testTBL Select * From 'table1.tablea';"
' Find out if the attempt to connect worked.
If cnn.State = adStateOpen Then
MsgBox "connection sucess"
Else
MsgBox "Sorry. can not connect."
End If
' Close the connection.
cnn.Close
best regards
stuart