By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,659 Members | 1,714 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,659 IT Pros & Developers. It's quick & easy.

connection to database

P: 2
I have created the table in sql plus. In sql,the followings are the input
User name: trainee
Password: trainee
Host string: traindev
There is a table named ‘reg’.
I am using ASP code to connect to the database.
The connection code:
Expand|Select|Wrap|Line Numbers
  1. <%
  2. Dim objConn
  3. Set objConn=Server.CreateObject("ADODB.Connection")
  4. objConn.Provider="MSDAORA"
  5. objConn.ConnectionString= "userid=trainee; password=trainee; datasource=traindev"
  6. objConn.Open
  7. %>
But it shows the following error:
Error Type:
Microsoft OLE DB Provider for Oracle (0x80004005)
ORA-12203: TNS:unable to connect to destination
Jun 2 '11 #1
Share this Question
Share on Google+
1 Reply

Expert 2.5K+
P: 3,405
that doesn't look like a very standard connection string. I could be wrong. Is traindev a DSN you created, or the name of the Oracle server?
Jun 8 '11 #2

Post your reply

Sign in to post your reply or Sign up for a free account.