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

Oracle connectio to ASP

P: 1
Hi.. I am new to ASP. Whenever I am trying to connect to ASP, i am getting the following error...
The page cannot be displayed

There is a problem with the page you are trying to reach and it cannot be displayed.
Please try the following:

Click the Refresh button, or try again later.
Open the localhost home page, and then look for links to the information you want.
HTTP 500.100 - Internal Server Error - ASP error
Internet Information Services

Technical Information (for support personnel)

Error Type:
Microsoft OLE DB Provider for Oracle (0x80004005)
ORA-12154: TNS:could not resolve the connect identifier specified
/tele/login.asp, line 7
Browser Type:
Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.20 Safari/535.1
Page:
POST 17 bytes to /tele/login.asp
POST Data:
name=aaa&pass=aaa
Time:
Saturday, October 29, 2011, 4:02:47 PM
More information:
Microsoft Support

My Source code is:
Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <body>
  3. <%
  4. set cn= Server.Createobject("ADODB.Connection")
  5. set rs=Server.Createobject("ADODB.recordset")
  6. cn.ConnectionString="provider=MSDAORA; Data Source=oracle;"&"User ID=system;" & "Password=jivan12"
  7. cn.open()
  8. uname=request.form("name")
  9. pwd=request.form("pass")
  10. st="select * from logininfo where username="'&uname' "and password="'&pwd'
  11. set rs=cn.execute(st)
  12. if rs.eof then
  13. response.write("<h4>"&"Invalid details"&"</h4>")
  14. else
  15. response.write("logged in")
  16. end if
  17. cn.close()
  18. %>
  19. </body>
  20. </html>
Oct 29 '11 #1
Share this Question
Share on Google+
2 Replies


jhardman
Expert 2.5K+
P: 3,405
Interesting question. Did you set up the DSN? If so, did it have a spot to test the connection? If so, what response did you get? Can you get back into the Data Sources and check out that DSN and see if it still works.

Jared
Oct 30 '11 #2

CroCrew
Expert 100+
P: 563
Also look into your TNSnames.ora file to see if it has an entry for the database that you are trying to access.

CroCrew~
Nov 17 '11 #3

Post your reply

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