Connection Help

  • Thread starter Thread starter Miro
  • Start date Start date
M

Miro

I am doing some lessons on a book and when connecting to a database supplied I
sometimes get this error:

Playing with the System.Data.SqlClient.SqlConnection

When I click on the ConnectionString property, and click on New Connection,
I browse for my mdf file,
click on "Use Windows Authentication" and click on
Test Connection.

I get this error:
This connection cannot be tested because no server name has been specified.

So then I click on "Advanced", and click the dropdown box of the Data Source
and put ".\SQLEXPRESS" into it.

Now clicking "OK", I click on "Test Connection" one more time.
I now get a new error.
Cannot open user default database. Login failed.
Login failed for user 'MIRO\Miro Nagy'


Can anyone let me know what property I am missing to get this connection to work,
either in a setup somewhere or another property.

I cant seem to figure out why it works sometimes - and other times not.

Thanks,

Miro
 
Its the User Instance, but im not sure as to why this setting being "False"
would give me my error.
 
Back
Top