Here's what I use from an IIS webserver ASP page:
SQL1 = "select abc from table_xyz" 'whatever SQL statement you want to try
set DbObj = Server.CreateObject("ADODB.Connection")
DbObj.Open "Driver={Microsoft ODBC for Oracle};SERVER=prod;UID=abcuser;PWD=whateverpwd;"
Set oRS1 = DbObj.Execute(SQL1)
Etc.
Works just fine but make sure you can resolve (e.g. tnsping) your DB on the box where the code is running.
Do you have a local Oracle client / tnsname.ora installed on the box ?
Chris.
-----Original Message-----
From: Tavousi Mahnaz [mailto:oracledba-ezmlmshield-x21526389.[Email address protected]
Sent: Thursday, October 05, 2006 1:19 PM
To: LazyDBA Discussion
Subject: DSN-less connection string for Oracle
Hello,
I am trying to connect to Oracle using DSN-less connection. I have tried
several strings but non of them works, do you have any recommendation?
"Provider = MSDAORA;User ID=x;Password=x;Data Source=xxx;DATABASE=mydb;"
"Driver={Microsoft ODBC Driver for Oracle};"
"ConnectString=OracleServer.world;" "Uid=x;" "x";
(I don't know what is OracleServer.world)
" Driver={Oracle ODBC Driver};" "Dbq=tnsnames.ora entry;" "UID=x;"
"PWD=x;" ;
Thanks
---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
Oracle LazyDBA home page