D:\Visual Studio Projects\WindowsApplication1\Module1.vb(44): “System.Data.SqlClient.SQL”是“Private”,因此它在此上下文中无法访问。
这个错误代表什么意思呀?我不知道该怎么改了

解决方案 »

  1.   

    这个是vb.net的东西吧,怎么拿到这里来问了到vb.net模块去问吧
      

  2.   

    '以下是源代码Imports System.Data.SqlClientPublic Class frmEmpIn
        Inherits System.Windows.Forms.Form'略去Windows窗体设计器生成的代码    Private ds As New DataSet
        Private sqlAdpt As SqlDataAdapter
        Private Sub IniForm()
            Try
                Me.DataGrid1.AllowSorting = False
                sql = "SELECT * FROM tblEmployee"
                sqlAdpt = New SqlDataAdapter(sql, cn)
                FillDataSet(ds, sqlAdpt, "Employee")
                Me.DataGrid1.DataSource = ds
                Me.DataGrid1.DataMember = "Employee"
            Catch err As Exception
                MsgBox(err.ToString)
            Finally
                If cn.State <> ConnectionState.Closed Then
                    cn.Close()
                End If
            End Try
        End Sub
        Private Sub frmEmpIn_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load    End Sub
    End Class