remote sever connection

D

Dave

I have the following code that runs from a form. It works in the original
database but when I make a new database and copy the statement to a new form
and run the form an error message appears in the VB window: "Compile Error,
Invalid use of New Keyword" refering to "Set cnMarvin = New Connection" in
the script.


Thank you
Dave

Private Sub cmdDelete_Click()
' declare and instantiate the object variables
Dim cnMarvin As Connection
Set cnMarvin = New Connection
Dim rsLSS As Recordset
Set rsLSS = New Recordset
Dim comExecute As Command
Set comExecute = New Command


' connect to MARVIN

With cnMarvin
.Provider = "MSDASQL"
.ConnectionString = "DRIVER={Microsoft ODBC for
Oracle};UID=XXXXXX;SERVER=dmrprod;Password=XXXXXX"
.Open
End With
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top