Compressed MDB and DataGrid problem.

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

Set DataGrid1.DataSource = rsRec.DataSource

If rsRec.State = adStateOpen Then
End If

End Sub

In the Database connection I have used the mode to:
CN.Mode = adShareExclusive

but the problem persists.

10-27-2004, 02:27 AM
How did you compress and encrypt your MDB file?

10-27-2004, 02:30 AM
If you compressed the MDB from within Access I don't think it's really compressed in terms of compression like ZIP.

To connect to an encrypted MDB:

10-27-2004, 02:36 AM
How did you compress and encrypt your MDB file?

I am using Access XP. In the Tools Menu ---> Security ----> Encrypt/Decrypt Database.

The database is now automatically compact and encrypted.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum