Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

trying to use odbcDirect

Status
Not open for further replies.

davejam

Technical User
Jan 6, 2004
313
GB
Hi all,

I am trying to remove linked tables from my application (audit requirement) and so need to setup using odbcDirect.

My backend is oracle and have the ora10g driver installed on my machine.

Have only just started playing with this but having issues when connecting to database - an odbc error has occured!!

Code:
strDSN = "server"
strUsrName = "uname"
strPwd = "pword"


Set odbcConn = odbcWksp.OpenConnection("Connection1", dbDriverComplete, True, "ODBC;DRIVER={Microsoft ODBC for Oracle};UID=" & strUsrName & ";PWD=" & strPwd & ";SERVER=myConn;DSN=" & strDSN)

I have specified myConn as a connection within TNSnames.ora although not sure what the syntax is to this...

so it seems to run through properly but then when i try to open a recordset i get - odbc call failed

Code:
myConn = 
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = servername)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = tnsName)
    )
  )

can anyone see where i may be going wrong with this as time is running out!!!

Thank you

davejam
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top