PDA

View Full Version : MS SQLExpress 2005 Connection Problem


Doudar
24-06-2007, 09:58 AM
I have installed MS SQLExpress 2005 on my test sever at home (W2K3), not a domain controller, created a database and added some tables. I am using this connection string in a asp script but get the following error when trying to connect to the database.

strAsgSQLConn = "Provider=SQLNCLI; Server=BENDER\SQLExpress; Database=myasg; Uid=Admin Pwd=password"

Microsoft SQL Native Client error '80004005'

Login failed for user 'Admin'. The user is not associated with a trusted SQL Server connection

The account I am using is the server admin account. I have installed QL Server Management Studio Express on both the server and a client PC and can connect to the database from both fine. I have tried setting the security on SQLExpress to both Windows Authentication and SQL Authentication but neither works.

Anyone got any pointers?

Cheers

JohnD

siphilp
24-06-2007, 10:30 AM
I would check out

http://www.connectionstrings.com/?carrier=sqlserver

you'll then see the difference syntax between trusted and standard connections.

screwsoft
25-06-2007, 01:11 AM
Have you created the user in SQL Server Management Studio and Given the user access rights to that specific database. Also by default SQL Express 2005 does not allow remote connections so you have to allow tcp connections.