By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,197 Members | 1,205 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,197 IT Pros & Developers. It's quick & easy.

MS Access Password Protection Urgent plz help

P: 64
How do I Compress my Database with password (MS Access Database).
Script Below was done if my database unlock with password protection, but when it lock...
I've got an error :

Cannot start your application. The workgroup information file is missing or opened exclusively by another user.

Plz Help me....

[code]

Dim con As New OleDbConnection("provider=microsoft.jet.oledb.4.0; UserID=Admin;Password=precise;data source=" + Application.StartupPath + "\\db1.mdb;")

Dim ada As New OleDbDataAdapter

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
ada = New OleDbDataAdapter("select * from Table1", con)
Dim dt As New DataTable
ada.Fill(dt)

Dim user As String = ""
Dim pass As String = ""

user = dt.Rows(0).ItemArray(0).ToString()
pass = dt.Rows(0).ItemArray(1).ToString()

If TextBox1.Text = user And TextBox2.Text = pass Then
MessageBox.Show("Success")
Else
MessageBox.Show("Failed")
End If
End Sub
{/code]
Apr 20 '07 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.