Visual Studio 2008 Beta 2 Sample Code

Just spotted two downloads for sample code updated for VS 2008 Beta 2.

Samples for Visual Studio 2008 Beta 2 (VB.net)

LINQ and language samples for Visual Studio 2008 Beta 2 (C#)

Lots of different samples here covering both Linq and the core language features. Always something handy to have on your harddrive.

——-

After downloading, I tried to run the C# sample for DynamicQuery and received the following error:

“Failed to generate a user instance of SQL Server due to a failure in copying database files. The connection will be closed.”

I changed the query string to be user instance=false which caused a much more helpful error message.

“CREATE DATABASE permission denied in database ‘master’.
An attempt to attach an auto-named database for file E:UsersBen HallDocumentsVisual Studio SamplesCSharpSamplesLinqSamplesDataNORTHWND.MDF failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.”

So I changed the query string to use my pre-exiting Northwind Database

“string connString = string.Format(“server={0};database=northwind;Integrated Security=SSPI;Connection Timeout=30″, sqlServerInstance);”

This change will need to be made to all of the database interacting samples. 

Technorati Tags: , , ,

One thought on “Visual Studio 2008 Beta 2 Sample Code”

  1. failed to generate a user instance of SQL Server due to a failure in stating the process for the user instance 2007

    Yo tuve ese problema y lo resolvi de la siguiente forma:

    revise el archivo de error que se genera en esta carpeta:

    C:Documents and SettingsUserLocal SettingsApplication DataMicrosoftMicrosoft SQL Server DataSQLEXPRESS

    en ese archivo buscar el error:

    “FCB::Open: Operating system error”

    y muestra una ruta que intenta abrir esta base de datos: mssqlsystemresource.mdf

    hay que asegurarse de que existe esa base de datos. Es una plantilla que se utiliza para hacer la instancia de sql.

    Ing. Juan Bosco.
    [email protected]

Leave a Reply

Your email address will not be published. Required fields are marked *