[Last Call] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 695
  • Last Modified:

creating database user SQL 2005

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'
Under General,
Type user name, password, select SQL authentication.
Select default database which I want to give access.

Under ServerRoles,
Select all roles
Select the database I want to access with the login under User Mapping, then give all role memberships for the db.

Under Securable,

Under status,
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"/>
1 Solution
lcohanDatabase AnalystCommented:
is your SQL Server running as an instance? If yes only then is should be aclled as "SQL_SERV\SQL2005" (computer_name\instance_name)otherwise just by its name which I presume is "SQL2005"
crcsupportAuthor Commented:
Thank you.

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now