Re: Database Connection Problems

Tech-Archive recommends: Fix windows errors by optimizing your registry



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


.



Relevant Pages

  • Re: Error "SQL Server does not allow remote connections"
    ... The application could not connect to the sql server db. ... network is blocking the connection. ... SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 ... integratedSecurity, SqlConnection owningObject) +737554 ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Connection from remote computer to network SQL Server
    ... There is no firewall on the W2K machine acting as the SQL server. ... I tried making the SQL machine a "trusted" on the router. ... connection works. ... To find the IP address of your computer inside the network, ...
    (microsoft.public.access.adp.sqlserver)
  • ADO.net Orcas Samples Install Problem
    ... An error has occurred while establishing a connection to the server. ... When connecting to SQL Server 2005, this failure may be caused by the ... SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, ... or am I better off with a full SQL Server install. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: OpenDataSource SQL Server xpress problem
    ... I tried your suggestions with some success. ... I tried setting up the .odc file through the Word Mail Merge wizard as ... If I work through the dialog to connect and then click the 'Test Connection' ... but I suspect it's because until recently most SQL Server ...
    (microsoft.public.word.mailmerge.fields)
  • Re: Exception trying to import data from Excel .
    ... An attempt to install Microsoft SQL Server 2005 this week has not gone ... The connection type "EXCEL" specified for connection manager ... to create a connection manager for an unknown connection type. ...
    (microsoft.public.sqlserver.tools)