Wrox Programmer Forums
|
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
 
Old October 31st, 2006, 10:57 AM
Authorized User
 
Join Date: Jun 2006
Posts: 60
Thanks: 1
Thanked 0 Times in 0 Posts
Default 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


 
Old October 31st, 2006, 11:07 AM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

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
 
Old October 31st, 2006, 11:55 AM
Authorized User
 
Join Date: Jun 2006
Posts: 60
Thanks: 1
Thanked 0 Times in 0 Posts
Default

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)?

 
Old October 31st, 2006, 12:36 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
Default

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
 
Old October 31st, 2006, 12:48 PM
Authorized User
 
Join Date: Jun 2006
Posts: 60
Thanks: 1
Thanked 0 Times in 0 Posts
Default

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.

 
Old October 31st, 2006, 12:52 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
Default

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
 
Old October 31st, 2006, 01:37 PM
Authorized User
 
Join Date: Jun 2006
Posts: 60
Thanks: 1
Thanked 0 Times in 0 Posts
Default

I just copied the code to my asp file.






Similar Threads
Thread Thread Starter Forum Replies Last Post
WS problem:Unable to connect to the remote server momotr .NET Web Services 8 February 28th, 2008 01:19 PM
Server Does Not Exist - Connect String dalezjc BOOK: ASP.NET Website Programming Problem-Design-Solution 3 October 31st, 2006 05:13 PM
Sql Server does not exist mauks SQL Server 2000 3 December 2nd, 2005 03:02 PM
Problem with SQL SERVER Connection String Non Linear BOOK: Beginning ASP 3.0 3 October 20th, 2005 12:35 AM
'Remote server machine does not exist..." GandolftheWhite Pro VB Databases 0 November 15th, 2004 12:58 PM





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