|
-
Feb 27th, 2016, 06:30 PM
#1
Thread Starter
Fanatic Member
[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
-
Feb 28th, 2016, 08:23 AM
#2
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.
-
Feb 28th, 2016, 11:37 AM
#3
Thread Starter
Fanatic Member
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.
-
Feb 28th, 2016, 11:41 AM
#4
Thread Starter
Fanatic Member
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.
-
Feb 28th, 2016, 12:17 PM
#5
Thread Starter
Fanatic Member
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.
-
Feb 28th, 2016, 12:47 PM
#6
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.
-
Feb 28th, 2016, 02:01 PM
#7
Thread Starter
Fanatic Member
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?
-
Feb 28th, 2016, 03:02 PM
#8
Re: impossible to connect data environment to database
I already did.
Here's a picture:
Last edited by dilettante; Feb 28th, 2016 at 03:31 PM.
-
Feb 28th, 2016, 06:16 PM
#9
Thread Starter
Fanatic Member
Re: impossible to connect data environment to database
Last edited by Mustaphi; Feb 28th, 2016 at 06:25 PM.
-
Feb 29th, 2016, 06:40 AM
#10
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
-
Feb 29th, 2016, 04:27 PM
#11
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|