Question Cannot connect to database login failed

Gideon

Member
Joined
Aug 31, 2015
Messages
8
Programming Experience
Beginner
I have the following connectin string to connect to a loacla database (.mdf file) konneksie.ConnectionString = "Data Source = .\ SQLEXPRESS;Database=SkeduleringsDatabasis6;Integrated Security=TRUE"

I get an error : Cannot open database "C:\Users\Administrator\Desktop\SKEDULERING\Skedulering6\Ske*?dulering6\Skedulerin*?gsDatabasis6.mdf" requested by the login. The login failed. Login failed for user 'GIDEON-E-LAPTOP\Administrator. , I am utterly stumped. Please can someone help me?
 

jmcilhinney

VB.NET Forum Moderator
Staff member
Joined
Aug 17, 2004
Messages
14,368
Location
Sydney, Australia
Programming Experience
10+
That Administrator user obviously does not have the appropriate permissions set on your SQL Server instance. If you're going to use integrated security then the database server has to know the current user.
 
Top Bottom