Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

C#: Password protected DB connection

  • 12-06-2006 3:29pm
    #1
    Registered Users, Registered Users 2 Posts: 354 ✭✭


    I’m having trouble with a web application I’m trying to develop in c#. I can get everything working with an unsecured database but the problem arises when I try to use a password protected DB. I get the error:

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

    Any tips or hints you could give me would be great.
    connection.ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;
                                                  Data Source=C:\Applications\MyApp.mdb;
                                                  User ID=a;
                                                  Password=b";
    
    	if( !IsPostBack )
    	{
    		connection.Open();
    		adapter = new OleDbDataAdapter("SELECT Productname AS Name, ProdDesc AS Description FROM Products WHERE Ordered=True", connection);
    		adapter.Fill(products, "Products");
    		DataGrid1.DataSource = Products.Tables["Products"].DefaultView;
    		DataGrid1.DataBind();
    		connection.Close();
    }
    


Comments

Advertisement