'instance failure' error while connection string is correct

后端 未结 7 505
醉梦人生
醉梦人生 2021-01-01 10:01

I have following code on page load event:

 Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        con = New Sq         


        
7条回答
  •  情歌与酒
    2021-01-01 10:45

    As you got the error "instance failure", that might be the error with your SQL Server instance..

    Make sure your SQL Server instance(MSSQLSERVER) is running, where you can check in: Services list. TO get into services list: open run dialog box and type: "services.msc" (without quotes) and hit Enter. That takes you to services management console, where you can check whether your instance in running or not..

    If the problem still persists, then try using: Data Source=.\SQLEXPRESS instead.. :)

    Happy Coding... :)

提交回复
热议问题