Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_web_matrix thread: Can't Connect to SQL 2000 DB using Web Matrix


Message #1 by "Rob Cartwright" <rcartwright@r...> on Tue, 22 Oct 2002 12:04:09
Hi
I cannot connect to my SQL server with Web Matrix

When I try to connect I just get the message box
"Unable to Connect to the Database
SQL Server does not exist or access denied
ConnectionOpen(Connect())."

I've tried server name "LocalHost" and also using my own computer name
I've tried Windows or SQL authentication, no luck.

I CAN connect using Enterprise Manager, Query Analyser, or using ADO 
objects, or other similar methods - But Web Matrix won't have it. 
I am using SQL Server 2000 Desktop edition
Any ideas?
Rob Cartwright
Message #2 by David Barnes <DavidB@w...> on Tue, 22 Oct 2002 12:17:27 +0100
Rob

I'd first of all make sure that your SQL Server doesn't have an instance
name. When you put a computer name in the connection string, this will
access the default SQL Server instance. If for some reason your installation
has a non-default instance name, you need to add it:

server='computername\instancename'

You should be able to find the instance name by looking at the name given in
Enterprise Manager, under SQL Server Group.

For example, I have two SQL Server instances... an expired evaluation
edition, and MSDE so I get:

(local) (Windows NT)
WROXUKC019\NETSDK (Windows NT)

... and use server='WROXUKC19\NETSDK' to connect to MSDE.

Hope this helps

David

> -----Original Message-----
> From: Rob Cartwright [mailto:rcartwright@r...]
> Sent: Tuesday, October 22, 2002 1:04 PM
> To: ASP.NET Web Matrix
> Subject: [aspx_web_matrix] Can't Connect to SQL 2000 DB using 
> Web Matrix
> 
> 
> Hi
> I cannot connect to my SQL server with Web Matrix
> 
> When I try to connect I just get the message box
> "Unable to Connect to the Database
> SQL Server does not exist or access denied
> ConnectionOpen(Connect())."
> 
> I've tried server name "LocalHost" and also using my own computer name
> I've tried Windows or SQL authentication, no luck.
> 
> I CAN connect using Enterprise Manager, Query Analyser, or using ADO 
> objects, or other similar methods - But Web Matrix won't have it. 
> I am using SQL Server 2000 Desktop edition
> Any ideas?
> Rob Cartwright
> 
Message #3 by rcartwright@r... on Wed, 23 Oct 2002 10:08:51 +0100
Thats it!
Reason was I used to have SQL 6.5 installed, so SQL2000 had to be installed
as a separate instance
Since then I deleted 6.5 but SQL2000 is still a named instance.

Thanks v much,  It works now. I can go on and start selling Pizzas...
Cheers Rob




  Return to Index