Wrox Programmer Forums
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old April 23rd, 2007, 12:07 PM
Authorized User
Join Date: Apr 2007
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default SQL Server does not exist or access denied


I have a question about Connection String, it keeps saying that
Microsoft OLE DB Provider for SQL Server error '80004005'

[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.

Please help.


/student_action.asp, line 90

Line90 is conn.open

-----connect.asp file ----
strConnect="driver={SQL Server};Server=xxx;database=xxx; UID=xxx; PWD=xxx;"

----student_action.asp file ------


DIM name, strSQL, Email_address, conn

Email_Address = trim(Request.Form("EmailAddress"))
Name = Trim(Request.Form("Name"))

set conn = server.CreateObject("ADODB.Connection")

strSQL = "Select * From Echoes Where Email_Address = '" & email_Address & "'"
set pRS = server.CreateObject("ADODB.Recordset")
pRS.open strSQL, conn, 3,1,1

if not(pRS.eof) then
        set pRS = nothing
        set conn=nothing
        session("strMsg") = "Email exists. Please enter a unique email address."
        response.redirect "student.asp?Name=" & Name & " & "&EmailAddress=" & Email_Address
end if

strSQL = "Insert into Echoes (name, email_address) values ('" & name & "', '" & email_address & "')"

conn.execute strSQL
set conn = nothing

There is NO stupid question.
Old April 25th, 2007, 12:44 PM
Friend of Wrox
Join Date: Jul 2003
Posts: 599
Thanks: 6
Thanked 3 Times in 3 Posts

Try this and see if you get this far. Are you able to connect to the SQL server through Enterprise Manager with the connection string you have in the code?

Response.Write(strConnect & "<br>")
set conn = server.CreateObject("ADODB.Connection")
conn.open strConnect
Response.Write("Good to here.")

Old April 25th, 2007, 09:00 PM
Wrox Author
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons

I think that will most certainly result in the same error. The problem I believe you are encountering is that the user you have defined in your query string does not have rights to access X database. Have you ensured that the user does, in fact, have rights to the catalog?

================================================== =========
Read this if you want to know how to get a correct reply for your question:
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
================================================== =========
Why can't Programmers, program??
================================================== =========
Old May 18th, 2007, 11:43 AM
Authorized User
Join Date: Apr 2007
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts

I defined the Id by ID=request( "id" ), no more syntax errors. But it shows all blank text boxes.
What did I do wrong?


Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL Server does not exist or access denied happygv SQL Server 2000 0 April 9th, 2008 02:27 AM
SQL Server does not exist or access denied. jimbeam36 BOOK: ASP.NET Website Programming Problem-Design-Solution 3 November 3rd, 2004 08:51 AM
SQL Server does not exist or access denied rj1406 ASP.NET 1.0 and 1.1 Basics 1 September 16th, 2004 08:58 PM
SQL Server does not exist or access denied haidee_mccaffrey Classic ASP Databases 19 June 28th, 2004 09:38 PM
SQL Server does not exist or access denied. nitinmailbox All Other Wrox Books 1 June 25th, 2003 06:35 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.