Click here to Skip to main content
15,895,606 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I put my password on the database.(access database)
When I want it to open within the program. I get this Following error:

"cannot start your application.the workshipworkgroup information file is missing
or opened exclusively by another user."
please help me
------------------------------My code----------------------------------
VB
Imports System.Data
Imports System.Data.OleDb
Public Class Form1
    Dim cnnOLEDB As New OleDbConnection

    Dim cmdOLEDB As New OleDbCommand

    Dim cmdInsert As New OleDbCommand

    Dim cmdUpdate As New OleDbCommand

    Dim cmdDelete As New OleDbCommand

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Try
            Dim strConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
        System.Environment.CurrentDirectory & "\data.mdb;Password=ehsan"
            cnnOLEDB.ConnectionString = strConnectionString
            cnnOLEDB.Open()
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try

    End Sub
End Class


[Modified: you don't put regular text into pre tags]
Posted
Updated 17-May-10 12:08pm
v3
Comments
William Winner 17-May-10 18:08pm    
don't post the same question more than once

1 solution

If you password protected the whole access database, then you need to use
VB
Dim strConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
        System.Environment.CurrentDirectory & "\data.mdb;Jet OLEDB:Database Password=ehsan"


The error is saying that it is expecting a workgroup information file. If the fix above doesn't work, then look here: Common data access page deployment Errors[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900