Database created in SQL Server Management Studios cannot be found by Visual Studio 2010

后端 未结 1 1395
太阳男子
太阳男子 2021-01-21 14:54

I created a new database (AC_2012) on my localhost in SQL Server 2008 Management Studio.

I\'m trying to connect it via connection string in web.con

相关标签:
1条回答
  • 2021-01-21 15:32

    Database names with an underscore _ need to be delimited with square braces [].

    Try

    connectionString="server=.\SQLEXPRESS;database=[AC_2012]; integrated security=True; "

    Alternatively, just don't put an underscore in your database name.

    0 讨论(0)
提交回复
热议问题