fguihen Posted June 3, 2005 Posted June 3, 2005 i have installed sql Server 2000 and im trying to connect to a database with the connection string string connString = @"server=FINTANSPC; uid=sa; pwd=; database=northwind"; it wont work, so i tried string connString = @"server=localhost; uid=sa; pwd=; database=northwind"; on the first it says "login failed for user 'sa'. Reason: not associated with a trusted sql server connection. on the second connection string i am told the sql server doesnt exist. how come i cant connect using either string? should the localhost not return the same as the other server name, as they are both the same? (by the way, the name of my pc on my little home network is FINTANSPC) Quote
fguihen Posted June 3, 2005 Author Posted June 3, 2005 ok. ive found out how to log on with "sa" username in the connection string. i changed the authentication type from windows login to sql server authentication. i have my own name in sql server as a user also. the sa is of the type "standard ". my name is of the "windows user" type, and this seems to be stopping me form being able to use my name to connect to sql server through an application. any ideas on how i might fix this? also my server is known as "FINTANSPC", which is the name of my pc. how do i set it so that i refer to the server as "LOCALHOST" in the connection string?my current connection string is: string connString = @"server=FINTANSPC; uid=sa; pwd=; database=northwind"; Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.