Re: Database Connection Problems
- From: "Cor Ligthert[MVP]" <notmyfirstname@xxxxxxxxx>
- Date: Wed, 15 Aug 2007 06:05:41 +0200
Johnatan,
Are you sure that you have integrated rights on that other machine. In my expirience that is the most common problem. You can maybe make a connection with SQL authentication.
Cor
"Jonathan Wood" <jwood@xxxxxxxxxxxxxxxx> schreef in bericht news:%23%23hI$7o3HHA.5852@xxxxxxxxxxxxxxxxxxxxxxx
I'm new to SQL Server and seem to have a lot of problems with my connection string not working. I finally got it working on one system but then it stopped working when I moved to another system. Can anyone give me some ideas as to why?
IMPORTANT: This is not on the final Web-hosting machine. I'm just trying to get it running on my production machine for development and testing.
My current connection string is "Server=.\SQLEXPRESS;Integrated security=SSPI;Initial Catalog=BlackBelt".
Which gives me the error "Cannot open database "BlackBelt" requested by the login. The login failed. Login failed for user 'Jonathan-PC\Jonathan'."
I'm running as an administrator on Vista and, when I right-click on the database (BlackBelt.mdf) in the Server Explorer and select the Modify Connection command, I see 'Use
Windows Authentication' is selected, for which I obviously have correct authentication. And if I click 'Test Connection' from this same dialog, it reports that the connection succeeded.
I have SQL Server Express installed and SQL Server Configuration Manager is setup as follows:
SQL Server 2005 Services
- SQL Server (SQLEXPRESS) = Running
- SQL Server Browser = Stopped
SQL Server 2005 Network Configuration
- Protocols for SQLEXPRESS
- Shared Memory = Enabled
- Named Pipes = Disabled
- TCP/IP = Disabled
- VIA = Disabled
SQL Native Client Configuration
- Client Protocols
- Shared Memory = Enabled
- Named Pipes = Enabled
- TCP/IP = Enabled
- VIA = Disabled
Aliases
(Empty)
I was able to get it working with the connection string "Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Users\Jonathan\Documents\Visual Studio 2005\WebSites\BlackBelt\App_Data\BlackBelt.mdf;Integrated Security=True;User Instance=True" but I have no idea why and some folks told me that there are problems connecting with User Instance = True.
I don't get why I'm having so much trouble with this. Any suggestions appreciated.
--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com
.
- Follow-Ups:
- Re: Database Connection Problems
- From: Jonathan Wood
- Re: Database Connection Problems
- References:
- Database Connection Problems
- From: Jonathan Wood
- Database Connection Problems
- Prev by Date: Re: Data with Apostrophes
- Next by Date: Re: Data with Apostrophes
- Previous by thread: Database Connection Problems
- Next by thread: Re: Database Connection Problems
- Index(es):
Relevant Pages
|