Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Row handles must all be released before new ones can be obtained

$
0
0
This is my code to fill datagridview
When this code is executed I got an error msg
Row handles must all be released before new ones can be obtained.
  Dim rs3 As New ADODB.Recordset
        Dim da As OleDbDataAdapter = New OleDbDataAdapter()
        Dim myDS = New DataSet("MyTable")
        Dim strSQL As String
        strSQL = "select prtynm from prtydtl"
        rs3.Open(strSQL, con, ADODB.CursorTypeEnum.adOpenKeyset, ADODB.LockTypeEnum.adLockOptimistic)
        If Not rs3.EOF Then
            da.Fill(myDS, rs3, "MyTable")
            prtynmDataGrid.RowHeadersVisible = False
            prtynmDataGrid.DataSource = myDS
            prtynmDataGrid.DataMember = "MyTable"
            'count = prtynmDataGrid.RowCount
        End If
        rs3 = Nothing

Viewing all articles
Browse latest Browse all 51036

Latest Images

Trending Articles



Latest Images