DataGrid数据库绑定
Dim strsql As StringDim adoRead As SqlDataReader
Dim conStr As New clsAdoNetSql
strsql = "SELECT STUDENT_ID,STUDENT_NAME,INSERT_DATE FROM T_BASE_INFO WHERE DELETE_FLG=1"
Try
adoRead = conStr.RunQueryCmd(strsql)
If adoRead Is Nothing Then
dgField.DataSource = adoRead
dgField.DataBind()
adoRead.Close()
conStr.CloseConnection()
End If
Catch ex As Exception
If Not adoRead Is Nothing Then
adoRead.Close()
conStr.CloseConnection()
End If
End Try
这一段代码有问题吗??为什么我不能显示数据??