Connection string to database Oracle

Hi,

On a Windows 2008 server, in ODBC Data Source Administrator, I have defined a system data source (System DSN) named TRAP, with the driver : "Oracle dans OraClient11g_home1".

In the ASP script I have created a connection:
Set objConn = Server.CreateObject("ADODB.Connection")

and I need a connection string for that data source. I have tried :
objConn.Open "Driver={Oracle dans OraClient11g_home1};Dbq=TRAP;Uid=radu;Pwd=pass;"

but I have the following error message:

Microsoft OLE DB Provider for ODBC Drivers error '80040e37'

[Oracle][ODBC][Ora]ORA-00942: Table ou vue inexistante

Any suggestion, please ?

3 answers

The connection string is good:
objConn.Open "Driver={Oracle dans OraClient11g_home1};Dbq=TRAP;Uid=radu;Pwd=pass;"

My error was in SQL phrase.

A+

to know the connection string do the following
open cmd then type the following & press enter:
"TNSPING oracleserverIP/databasename"

Now u ll get connection string details as follow:

Data Source=(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.15.113)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = MyDB))); User Id=SYSMAN; Password=oracle;"

This one i hv tried in oracle 10g and working fine

Hi,

This method also works fine with oracle 11g.
Thank you very much.