VB.NET与SQL server 2000数据库连接的问题
程序如下:
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
SqlConnection1.Open()
End Sub
Private Sub Form1_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
SqlConnection1.Close()
End Sub
Dim dataset1 As New dataset1
Private Sub btnload_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnload.Click
dataset1.Clear()
SqlDataAdapter1.Fill(dataset1)
End Sub
运行点击加载出现下面的错误信息:
未处理的“System.Data.SqlClient.SqlException”类型的异常出现在 system.data.dll 中。
其他信息: 系统错误。
有人知道为什么吗?