the rs1.RecordCount in the following code is giving 279 when there are 290 records present in the table [ReservationbyContact]
can anyone tell whats could be wrong in this code. any hint would be appreciated.
visu
'Create the connection to database.
cnn1.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\" & _
"KUTC Database\MasterDB.mdb;"
'Define and execute command to select all field
'from a single table.
Set cmd1 = New ADODB.Command
With cmd1
.ActiveConnection = cnn1
.CommandText = "Select * from [RegistrationbyContact] "
.CommandType = adCmdText
.Execute
End With
'Assign the return set to a recordset.
Set rst1 = New ADODB.Recordset
rst1.CursorType = adOpenStatic
rst1.LockType = adLockReadOnly
rst1.Open cmd1
MsgBox "ReservationbyContact rows # " & rst1.RecordCount
can anyone tell whats could be wrong in this code. any hint would be appreciated.
visu
'Create the connection to database.
cnn1.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\" & _
"KUTC Database\MasterDB.mdb;"
'Define and execute command to select all field
'from a single table.
Set cmd1 = New ADODB.Command
With cmd1
.ActiveConnection = cnn1
.CommandText = "Select * from [RegistrationbyContact] "
.CommandType = adCmdText
.Execute
End With
'Assign the return set to a recordset.
Set rst1 = New ADODB.Recordset
rst1.CursorType = adOpenStatic
rst1.LockType = adLockReadOnly
rst1.Open cmd1
MsgBox "ReservationbyContact rows # " & rst1.RecordCount