locked
how to connect to database from dataGridView RRS feed

  • Question

  • I've been working on the C# windows application with connect to database using dataGridView. On the smart tag on dataGridView, click new connection and click second button for browse database. If I select northwind.mdf, click 'test connection', error message says "Generating user instances in SQL Server is disabled. Use sp_configure 'user instances enabled' to generate user instances". I don't know why I cannot access to database. I appreciate for the tip.
    Wednesday, February 28, 2007 3:08 PM

Answers

  • Hi,

    Try to do the follows.

    Open the SQL Server Management Studio.

    In the query editor type this text: exec sp_configure 'user instances enabled', 1.
    Then type: Reconfigure.
    Then restart the SQL Server database.

    And it can solve the problem.

    Thank you

    Thursday, March 1, 2007 8:06 AM

All replies