Home » Infrastructure » Windows » ODBC Connection String
ODBC Connection String [message #100595] Mon, 03 March 2003 00:14 Go to next message
swapna
Messages: 11
Registered: May 2002
Junior Member
Can anyone give me the code of connection string for connecting to oracle from Vb using ADO. I also want to know how to configure the connection. I m getting the error "tns error: cannot resolve service name"
Re: ODBC Connection String [message #100597 is a reply to message #100595] Mon, 03 March 2003 06:58 Go to previous message
Mahesh Rajendran
Messages: 10708
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
[code]i beleive u have to first create a connect string, by editing tnsnames.ora or using net8 asssistent.
then create DSN for using in ODBC.
a typical tnsentry would be
< yourConnecString >  =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = < yourHost or IP > )(PORT = < urListenerPort > ))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = < your sid or serviceName>)
    )
  )

----------------------------------------------------------------------

BIOCHIP_CHIPDB2 =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = biochip.xxxx)(PORT = 1526))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = chipdb2.xxxxxxxx)
    )
  )
for the above entry...i would conect as
mag@itloaner1_local > connect dbadmin@biochip_chipdb2
Enter password: *********
Connected.
mag@itloaner1_local > 

Previous Topic: How to execute overloaded oracle procedure from C# code
Next Topic: java.exe error after installing Oracle 8 on win2k P4
Goto Forum:
  


Current Time: Fri Nov 29 05:28:38 CST 2024