 |
| Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." 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 Basics 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
|
|
|
|

October 31st, 2006, 10:57 AM
|
|
Authorized User
|
|
Join Date: Jun 2006
Posts: 60
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
Server Does Not Exist - Connect String Problem
I'm having a problem connecting to my SQL server with an ASP connection string. Per a tip I read in this forum, I created a UDL file and created the connect string that way and the connection test successfully. However, when I try using that same string with ASP, I keep getting a Server Does Exist, or Access Denied error. Here's my connect string:
<%
Option Explicit
Dim strConnection, conn
strConnection = "Provider=SQLOLEDB.1;Password=xxx;Persist Security Info=True;User ID=qdbreports;Initial Catalog=qdb;Data Source=myserver"
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open strConnection
%>
Help! Any suggestions are greatly appreciated.
Dale
|
|

October 31st, 2006, 11:07 AM
|
|
Wrox Author
|
|
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
|
|
Try this:
Change myserver to the IP of the server if you are still getting the problem, it is possible that your User does not have rights to the qdb database.
Also, through enterprise manager, make sure that in your security tab you have Authentication setup as SQL Server and Windows.
-------------------------
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.
^^Thats my signature
|
|

October 31st, 2006, 11:55 AM
|
|
Authorized User
|
|
Join Date: Jun 2006
Posts: 60
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
I changed the server to its IP, but still getting the same error. Also verified that the Authentication was set to SQL Server and Windows. If this is a user issue, why do the same credentials it work with the UDL file (asking out of complete ignorance)?
|
|

October 31st, 2006, 12:36 PM
|
|
Wrox Author
|
|
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
|
|
I am unfamiliar with an UDL file?
-------------------------
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.
^^Thats my signature
|
|

October 31st, 2006, 12:48 PM
|
|
Authorized User
|
|
Join Date: Jun 2006
Posts: 60
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
If you create a blank notepad file and save it as a UDL file, then right-click, select properties and you can set up a connection to the databse. Then open the UDL file and copy the connection string.
|
|

October 31st, 2006, 12:52 PM
|
|
Wrox Author
|
|
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
|
|
Never heard of them nor have I used them. I am curious though, the code you pasted, does that code reside in a file by itself that you include on other pages?
-------------------------
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.
^^Thats my signature
|
|

October 31st, 2006, 01:37 PM
|
|
Authorized User
|
|
Join Date: Jun 2006
Posts: 60
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
I just copied the code to my asp file.
|
|
 |