0

Hi Expert
I am working with a project in c# vs.net 2005 and sql express as backend. I have successfully completed the works.i want to connect my application and sql express on lan. I have successfully connected the data base one day before but because of some problem i have formated the harddisk on both client and server machines. now my application gives this error.
Create databse permission denied in database 'master'.
An attempt to attach an auto named database for file
C:\myDB.mdf failed.
a database with same name exist , or specified file cannot be opened, or is located on UNC share.


In this regard i have some question and need answers in detail.
1. Is there any way to create a login without using sql management studio.
Using this query "CREATE LOGIN user WITH PASSWORD='pwd'"
It executes successfully but gived this error "Login failed for user user. the user is not associated with a trusted sql server connection"
2. If i login with Windows authentication then gives the error
Create databse permission denied in database 'master'.
An attempt to attach an auto named database for file
C:\myDB.mdf failed.
a database with same name exist , or specified file cannot be opened, or is located on UNC share.
What is the problem with my application?
thnx

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by stbuchok
0

I don't know in detail, but everything is pointing to permissions. Make sure your user has access to do everything you want it to.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.