[RESOLVED] Getting the Recordcount
Hey guys a lil help pls...
VB Code:
Dim objDB As ADODB.Connection
Dim rs As ADODB.Recordset
Private Sub Command1_Click()
rs.Open "select * from card_Header", objDB.ConnectionString, , , adCmdText
Debug.Print rs.RecordCount
End Sub
Private Sub Form_Load()
Set objDB = New ADODB.Connection
Set rs = New ADODB.Recordset
objDB.Open "provider=microsoft.jet.oledb.4.0;data source=D:\Documents and Settings\Ruikeish\My Documents\mrserver.mdb"
End Sub
Why does Debug.print rs.RecordCount prints -1? instead of printing the no. of records of the table.
Thanks a lot...