LearnItFirst User Forum

New SQL Server 2008 DBA Course
Welcome Guest Search | New Posts | Members | Log In | Register

Connection string for program to be deployed Options
Jumbuck
Posted: Wednesday, April 22, 2009 5:49:39 PM
Rank: Newbie

Joined: 4/22/2009
Posts: 2
Points: 6
Where do you live?: US
I have a program that uses Integrated Security to connect successfully to a database, the connection string being

@"Data Source=.\SQLEXPRESS;AttachDBFilename=" + <DatabaseFile with path> + ";Integrated Security=True;User Instance=True;";

The program can be downloaded and installed by targeted end users, but end users running the downloaded program can't access the database, and instead get the following error:

CREATE Database permission denied in database 'master'
An attempt to attach an auto-named database for file <DatabaseFile with deployed path>failed. A database with the same name exists, or specified file cannot be opened, or is located on UNC share.

If I substitute "Database" for "AttachDBFilename" in the connecton string in the development computer, and download and install the amended program, end users now get the following error:

Cannot open database<DatabaseFile with deployed path> requested by the login. The login failed. Login failed for user \<end user computer name>\<end user name>

What should I do to enable end users to connect to the database? Confused
Users browsing this topic
Guest


Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.