Question Not authorised to use databse created in SQLExpress within VB Express

sjonny

New member
Joined
Dec 13, 2011
Messages
4
Programming Experience
10+
Hi,

Getting slightly nuts. Have created a databse with a few tables. Want to acces it from a newly created VB application, but it says I'm not allowed to do. I should contact the administrator.
The only thing I see is that the MS Studio VB tries to connect to .\SQLEXPRESS while the server connection in SQL server is :"Servername\SQLEXPRESS". Can that be the issue? If so, how can I change once and for all the connection in VB enviroment?

I have no user accounts set up. Altenrativly I created the tables dierectly in the VB.NET enviroment, but it seems it does not save the data in debug which forces me to recreate the data as long as I'm not deploying. If there is an easy way around tha I'd like to know.

Any help is welcome,Sjonny
 
Hi,

Application is indeed on the same server.
On the SQL Serve I have : MYNAME-TOUCHPC\SQLEXPRESS
When I tried in .NET VB express to open a database I created I get an error message that I have to contact the Db owner. But I do not manage users or authorisation on my server. So I can't get to the connection string
 
Can you install BBFlashback and take a screen recording of you reproduicing your error, export it lossless-SWF and zip it, uplaod it here..
 
but that's the chivken or the egg story. I can't add a datconnection to my databse, thus I get no connection string. The steps I do:
I do:
Add Connection. Then I choose : 'Micorsoft SQL Server Database File', then i n the Browse for file I choose the Databse I made with SQL Server. But then I egt a message saying I should contact the Database OWner.

WHen I alternatibvly, type in the full path instead of using browse for file, then I get another error message saying:
"Unabel to open physical file "file path" Operating system error 5 . An attempt to attach an auto-named database for file "full path" failed. A database with the same name exists, or specified file cannot be opened, or it is located on an UNC share"

The strange thing is that I did the same at work since many years without issues. The only difference is that I use here an Express version of .NET for VB.

Thanks for help
 
Back
Top