468,527 Members | 2,090 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,527 developers. It's quick & easy.

MS Access Password Protection Urgent plz help

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
0 799

Post your reply

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

Similar topics

17 posts views Thread by chicha | last post: by
1 post views Thread by John Michael | last post: by
9 posts views Thread by Lars Netzel | last post: by
22 posts views Thread by teejayem | last post: by
reply views Thread by NPC403 | last post: by
1 post views Thread by fmendoza | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.