Login to SQL Server Express via development environment (VS2010)

Posted by Sanarothe on Stack Overflow See other posts from Stack Overflow or by Sanarothe
Published on 2010-05-12T02:11:10Z Indexed on 2010/05/12 2:14 UTC
Read the original article Hit count: 380

Filed under:
|
|

Seems like I'm missing something simple, but my attempts to connect to SQL Server Express have failed. I feel like I need to add privileges for my account but I'm not sure where to do it.

Dev Env: VS 2010 (Web) SQL: Sql Server Express 2008 OS: XP

Trying to open a connection to database returns:

    Cannot open database "|DataDirectory|DropData.mdf" requested by the login. The login failed.
Login failed for user 'devel.'

I created the database using the interface in VS 2010 (Add new item -> DB File) but my ASP.Net class only covered design-time access and not access in code, so I'm not familiar with what to do. I created a user (Devel) using SQL Server Management Studio to avoid connecting as SA, but couldn't figure out how to give any SQL-level access rights to this account.

Any ideas? Thanks,

Cameron

© Stack Overflow or respective owner

Related posts about c#

Related posts about ASP.NET