使用 SQL 数据库检索到记录集。你有什么理由可以看到这不起作用?dataFN 是 datagridview 中的名称,这是正确的。消息框显示大约 51,000 条记录,因此 SQL 命令运行良好。
提前致谢
Dim i As Integer = 0
rs.Open("SELECT Elig.FirstName, Elig.LastName, Elig.GroupID, CallLog.EligID, " + _
"CallLog.DateTime, CallLog.AssignTo, CallLog.Status, CallLog.ReasonCode, " + _
"CallLog.ReasonDesc FROM Elig INNER JOIN CallLog ON Elig.EligID = CallLog.EligID " + _
"ORDER BY Elig.FirstName", AdoCon, rs.CursorType, rs.LockType, 0)
MessageBox.Show("you have " + rs.RecordCount.ToString + " rows")
While Not rs.EOF
DataGridView1.Rows(i).Cells("DataFN").Value = rs.Fields("FirstName").Value.ToString
rs.MoveNext()
i += 1
End While