ODBC Connection String [message #100595] |
Mon, 03 March 2003 00:14 |
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 |
|
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 >
|
|
|