I was connecting my sql 2005 database from windows applications using a specific username and password. when i have created the user manually i can connect easily to my application.
but when i created the user with code ie using sql scripts i was not able to connect to the database.
This is the message i am geting "Login failed for user 'dbAdmin'."
error code is -2146232060
error num is 18456
What can i do? Please any one help me.


Are the parameters for your connection string correct?
Are you using a SqlConnectionStringBuilder?

Check if you username and password is correct on the sqlconnection string. Also make sure your sql instance is configured to allow sql server and windows authentication. Check that also in your sqlconnection string.