rpk2006
10-27-2004, 02:25 AM
After I have compressed and encrypted my Access MDB file, the Datagrid in one of my Form has stopped displaying records. I am using following code:
Private Sub Form_Load()
Call Populate
End Sub
Private Sub Populate()
Dim rsRec As ADODB.Recordset
Set rsRec = New ADODB.Recordset
rsRec.Open "Select * from ticket", CN, adOpenKeyset, adLockReadOnly
rsRec.Requery
Set DataGrid1.DataSource = rsRec.DataSource
If rsRec.State = adStateOpen Then
rsRec.Close
End If
End Sub
In the Database connection I have used the mode to:
CN.Mode = adShareExclusive
but the problem persists.
Private Sub Form_Load()
Call Populate
End Sub
Private Sub Populate()
Dim rsRec As ADODB.Recordset
Set rsRec = New ADODB.Recordset
rsRec.Open "Select * from ticket", CN, adOpenKeyset, adLockReadOnly
rsRec.Requery
Set DataGrid1.DataSource = rsRec.DataSource
If rsRec.State = adStateOpen Then
rsRec.Close
End If
End Sub
In the Database connection I have used the mode to:
CN.Mode = adShareExclusive
but the problem persists.