This documentation is archived and is not being maintained.

Connecting to LINQ Sample Databases

.NET Framework 3.5

The default connection string for the samples should work without modification if you have SQL Server Express installed on your development computer.

On some SQL Server Express installations, you may not have the rights to start a user instance. If you get an error message to that effect, remove the clause ";user instance = true" from the connection string.

Be sure that the copies of the Northwind database that you are accessing are not marked read only. If necessary, browse to the copy of NORTHWIND.MDF that you are trying to access, right-click the file, and then click Properties. Clear the Read-only attribute.

On some slow computers, or when you are using a Virtual PC, users have reported that some database applications give errors the first time that they run. Try to run the sample two or three times.

The customized copies of the Northwind database included with the samples ship without an LDF (log) file. This is intentional so that the LDF and MDF files do not get out of sync. When you run a sample that uses the database, or attach to the database from Server Explorer inside Visual Studio, the LDF file will be created automatically. You may have trouble connecting to the MDF file if you are using the SQL Server Management Studio without first creating a log file.

Other Resources