Results 1 to 11 of 11

Thread: [RESOLVED] impossible to connect data environment to database

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2016
    Posts
    834

    Resolved [RESOLVED] impossible to connect data environment to database

    Hello
    I'm having a big problem to connect data environment with my database access.
    I'm facing this message when I try to test connexion
    Code:
    Failed connection test due to an error occurred while initializing provider. Can not start your application. The workgroup information file is missing or opened exclusively by another user.
    the database is protected by a password. I'm sure I submit the correct password but in vain.
    When I drop the password from database the connexion is established without any problem.
    Thanks for helping me

  2. #2
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,624

    Re: impossible to connect data environment to database

    The error message SEEMS pretty straightforward...either you have typed the name (and or path) of the database file incorrectly, or that database is opened by some other application. First thing...check to see if there is an laccdb (or lmdb) file in the same path as your accdb (or mdb) file. That would indicated that it is already opened. How about walking through the steps with us how you are trying to connect your DE to your database. Of course, I am one to NOT recommend using a DE control, rather directly querying the tables for what you need....but that's just me.

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2016
    Posts
    834

    Re: impossible to connect data environment to database

    either you have typed the name (and or path) of the database file incorrectly
    I don't think because I'm using the default dialog box to select the database

    Then I enter the correct password, I choose jet 4.0 . But when I click test Connection, i get this error:

    "Test connection failed because of an error in initializing provider. Can't start your application. The workgroup information file is missing or opened exclusively by another user."
    if i drop the password, the connection works but i need to have my database protected. by password.

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2016
    Posts
    834

    Re: impossible to connect data environment to database

    How about walking through the steps with us how you are trying to connect your DE to your database.
    I want to create reports using Data Environment
    So after after adding data environment to the project , from properties I choose the provider, then browse to database, enter password then click test connection
    Last edited by Mustaphi; Feb 28th, 2016 at 11:45 AM.

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2016
    Posts
    834

    Re: impossible to connect data environment to database

    check to see if there is an laccdb (or lmdb) file in the same path as your accdb (or mdb) file
    I checked and to get assured I copied the mdb file to another repertory but without success.

  6. #6
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: impossible to connect data environment to database

    I'd guess you are just letting Jet default to using the user's "default" .MDW system database (Workgroup Information File). Most newbs do this though it can present problems and be insecure.

    However you have complicated the issue by setting a share-level password on the database and then you try to use this as a user-level password. Kaboom. The error is telling you that the user/pw you specified isn't in the default MDW.

    Instead you have to provide the share-level password as the correct Connection property. This is not Password but instead the extended property Jet OLEDB:Database Password.


    Don't worry about people who don't know how to use a DataEnvironment (which is not a "control"). They seem to have limited knowledge of ADO usage based on copy/paste script snippets floating around that date back to early ASP scripting days. There is nothing "indirect" about using a DataEnvironment and this is actually the preferred approach for most scenarios.
    Last edited by dilettante; Feb 28th, 2016 at 03:00 PM.

  7. #7

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2016
    Posts
    834

    Re: impossible to connect data environment to database

    I'd guess you are just letting Jet default to using the user's "default" .MDW system database (Workgroup Information File).
    As mentioned above I'm using the default common dialog bo to select the mdb file and I'm certain that it is the mdb file.
    Instead you have to provide the share-level password as the correct Connection property.
    Would you please tell how to do that?

  8. #8
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: impossible to connect data environment to database

    I already did.

    Here's a picture:

    Name:  sshot.png
Views: 1126
Size:  22.4 KB
    Last edited by dilettante; Feb 28th, 2016 at 03:31 PM.

  9. #9

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2016
    Posts
    834

    Re: impossible to connect data environment to database

    thanks sir
    solved
    Last edited by Mustaphi; Feb 28th, 2016 at 06:25 PM.

  10. #10
    Frenzied Member
    Join Date
    Dec 2008
    Location
    Melbourne Australia
    Posts
    1,487

    Re: impossible to connect data environment to database

    "Don't worry about people who don't know how to use a DataEnvironment (which is not a "control"). They seem to have limited knowledge of ADO usage based on copy/paste script snippets floating around that date back to early ASP scripting days. There is nothing "indirect" about using a DataEnvironment and this is actually the preferred approach for most scenarios"

    I am one of those.
    You will find that well over 90% of professionals will tell you not to use the Data Environment.
    I believe it is possible to use Data Reports with out using -
    - Data Environment
    - Data Control
    - Binding

    "KISS",
    Rob

  11. #11
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: impossible to connect data environment to database

    Not really. Data Reports are based on data binding.

    Yes, you can play masochist and use VBScript-style ADO code to get a Recordset that can be bound to a Data Report but it gets pretty clunky.

    The designer is based on the notion that database connections are open for schema information at design time. I'm not saying you can't do that using script-style coding but it isn't obvious how to me and there is nothing in the documentation to suggest it as a viable option. The certification exams never covered such a thing either, while they did require knowledge of Data Environment use.

    The only alternative is to do everything in the Data Report designer by brute force "in the dark" without schema information.

    But I suppose some people don't rely on other power tools in the IDE either. What's next? A screed against IntelliSense?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width