rockybalboa
11-27-2013, 09:39 PM
I am trying to connect to oracle database via VBA. I want a way in which the macro will take the id and pass of the database from a given range. i am doing this because every body will be using their personal login and i cannot hardcode it.
conn = "UID=****;PWD=****;DRIVER={Microsoft ODBC for Oracle};SERVER=****;"
With cnn
.ConnectionString = conn
.CursorLocation = adUseClient
.Open
End With
Suppose the id is in Range M3 and Password in Range M4. I want the macro to pick UID from M3 and PWD from M4.
Thanks
conn = "UID=****;PWD=****;DRIVER={Microsoft ODBC for Oracle};SERVER=****;"
With cnn
.ConnectionString = conn
.CursorLocation = adUseClient
.Open
End With
Suppose the id is in Range M3 and Password in Range M4. I want the macro to pick UID from M3 and PWD from M4.
Thanks