creating database user SQL 2005
Posted on 2012-08-16
I'm trying to create a new database user so that I can use connection from my visual studio. there seems to be something I'm missing when I created the user in SQL management Studio. what I did was ;
Right click Security in SQL Management Studio, then 'New Login'
Type user name, password, select SQL authentication.
Select default database which I want to give access.
Select all roles
Select the database I want to access with the login under User Mapping, then give all role memberships for the db.
Grant and Enable
Now, when I try to connect from my Visual Studio, it times out. But from SQL Management studio, I was able to login and open any table under the mapped database.
connections string in web.config
<add name="aConn" connectionString="Data Source=SQL_SERV\SQL2005;Initial Catalog=db1;Uid=db1user;Pwd=xxxxx;Connect Timeout=120" providerName="System.Data.SqlClient"/>