
Originally Posted by
RhinoBull
There are couple of reasons:
1. You need to set recordset CursorLocation to client first.
Code:
Dim RST As ADODB.Recordset
Set RST = New ADODB.Recordset
rst.CursorLocation = adUseClient
2. Not every data provider supports the record count.
i got a trouble.
pls help me again.
here is the code i've entered.
Code:
Private Sub Command1_Click()
Set rec = New ADODB.Recordset
rec.CursorLocation = adUseClient
'to see how many records in the table
Text1.Text = rec.CursorLocation
MSFlexGrid1.TextMatrix(1, 0) = rec.Fields(0)
End Sub
then the attachment is the screen shot of the error.
the error is in the rec.fields (0) and said that:
Item cannot be found in the collection corresponding to the requested name or ordinal.