Wrox Programmer Forums
|
ASP Pro Code Clinic As of Oct 5, 2005, this forum is now locked. No posts have been deleted. Please use "Classic ASP Professional" at: http://p2p.wrox.com/forum.asp?FORUM_ID=56 for discussions similar to the old ASP Pro Code Clinic or one of the other many remaining ASP and ASP.NET forums here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP Pro Code Clinic 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 July 28th, 2004, 11:48 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default SQL 'With Instance' Connection String

Below are the main ConnectionStrings I use. I've interchanged the keywords from both (e.g. 'uid' for 'user id' and vice-versa)

ConnString = "provider=SQLOLEDB;user id=svcPerfReporting;password=perfreporting$;initia l
catalog=Perf_Reporting;Data Source=SYDSQLD02\SQLDEV_MORGANITE"

ConnString = "Driver={SQL Server};uid=svcPerfReporting;pwd=perfreporting$;da tabase=Perf_Reporting;
server=SYDSQLD02\SQLDEV_MORGANITE"

And then this is the error I usually get:

Microsoft OLE DB Provider for ODBC Drivers (0x80004005) [Microsoft][ODBC SQL Server Driver][Named Pipes]Specified SQL server not found. /cba/login.asp, line 20

OR

Microsoft OLE DB Provider for SQL Server (0x80004005) [DBNMPNTW]Specified SQL server not found. /cba/login.asp, line 20

I think the problem has something to do with the instance name, not too sure though... I've also tried replacing the server name with its IP address; as well as using the dot notation (e.g. "server.instancename")

Thank you in advance

Wind is your friend
Matt
__________________
Wind is your friend
Matt
 
Old July 29th, 2004, 07:46 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

connection string looks fine. What ADO version are you using? Anything less than 2.6 doesn't understand named instances.
 
Old July 29th, 2004, 07:11 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

pgTips

Thank you for your reply. Without direct admin server access we cant find out the ADO version, or can we. This SQL Server instance is within a bank network. Fairly tightly controlled as you can imagine. I will make efforts to find out the ADO version and get back to you, there is a very goo chance this is the issue?

Thanking you

Wind is your friend
Matt
 
Old July 30th, 2004, 06:44 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

Matt, something else just struck me when re-reading your post - the error indicates you're using Named Pipes to connect. The problem could be that Named Pipes is an authenticated protocol, but you're not passing any windows user credentials to authenticate. You're just passing a SQL uid/pwd which won't help you get the connection request across the network to the SQL box.

Try connecting through TCP/IP instead as that's not an authenticated protocol. Easiest was to do this is by adding Network Library=dbmssocn to your OLEDB conn string. (see http://support.microsoft.com/default.aspx?kbid=238949 for all the other options)

rgds
Phil
 
Old July 30th, 2004, 10:18 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

Phil

Thanking you, will try this and have a look at the link.


Wind is your friend
Matt
 
Old August 9th, 2004, 12:19 AM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

pgTips

Yes, brilliant ADO (MDAC) was the problem. All is good now this has been updated.

Thanking you kindly

Wind is your friend
Matt





Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL connection string naeem.net SQL Server ASP 0 July 10th, 2007 02:17 PM
How to declare a connection string of postgree SQl ramyajohn VS.NET 2002/2003 1 January 20th, 2006 06:19 AM
sql server 2000 connection string nikotromus Access VBA 6 February 13th, 2005 10:01 PM
SQL Server Connection String Nicky2k Classic ASP Basics 4 January 13th, 2005 05:22 AM
connection string for sql server rj1406 ASP.NET 1.0 and 1.1 Basics 6 September 16th, 2004 02:49 PM





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