1 year ago

#297676

test-img

Alex Bartram

c# database connection string issue

When the code is running. it launches fine, the form if filled out and the submit button is clicked generates a connection error. I believe it is to do with the connection credentials. Can someone tell me or confirm what the data source should be for a local machine and should the database have the .mdf after?

 SqlConnection conn = new SqlConnection("Data source=LocalDB; Database=UserData.mdf;User Id=admin; Password=123");

sql

visual-studio

local-database

0 Answers

Your Answer

Accepted video resources