If I supply an .mdb file with my program, that is used to store all of the user's data, then how can I protect the file from being accessed by the user? Since the database file would most probably be stored in the same folder as the program, any user with Micrsoft Access installed could open it up and mess with the database. How can I protect that from happening?
If you are going to say, use a password, then please tell me how to connect to a password protected access database using ADO 2.5. The connection string I'm using right now is:
Here is the code I use to open access .MDB files via Visual Basic. Load the Access file in Access and assign it a password, then in the code below, where it says password, change it to match the MDB file. Hope this helps
Dim fs As Object
Set fs = CreateObject("Scripting.FileSystemObject")
'Check for DataBasePath File before proceeding
If fs.FileExists(DatabasePath) Then
Set cnFMPCS = New ADODB.Connection
' OPEN THE DATABASE
.Provider = "Microsoft.Jet.OLEDB.4.0"
.Properties("Jet OLEDBatabase Password") = "passwordhere"
.Mode = adModeReadWrite