Trouble opening secure database - InfoPath Dev
in

InfoPath Dev

Trouble opening secure database

Last post 06-01-2011 08:28 AM by AnnKInfopath. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 05-26-2011 10:32 AM

    Trouble opening secure database

    I am at a loss as to how to fix this! Here is my problem: I have an Infopath 2003 form that draws from an Access 2003 database. Everything worked fine, until I added user-level security to the database. Now the form opens fine, but when you hit the query button (i.e. when it has to open the data connection to the db), you now get a pop-up that says "Plase Enter MS JET OLE DB Initialization Information" with 5 fields: 'Data Source', has the correct path to the db; 'User Name', defaults to Admin; 'Password', and 'Provider String' are blank, and 'Open Mode' defaults to DB_MODE_READWRITE.

    If you just hit "OK" without entering anything in the boxes, you get a message that says "InfoPath cannot connect to the data source.
    You do not have the necessary permissions to use the 'S:\pathtodatabase\databasename.mdb' object.  Have your system administrator or the person who created this object establish the appropriate permissions for you.". 

    If you enter a user name and password for the database, you get "InfoPath cannot connect to the data source. Cannot start your application. The workgroup information file is missing or opened exclusively by another user."

    The database and form template are both on a shared network drive that the users have read and write access to.  The workgroup information file with the user-level security info is in the same place.  All the users are able to open the database with their username and password, but none of them can get the form to open it. 

    I tried creating a 'dummy' user and password and went through instructions I found for embeding the password via the data connection.  But maybe that solution was geared to a database password rather than user-level passwords, because I get the same message when I try to test the connection.

    This is SO frustrating!!  Please help if you have any ideas that I could try (short of un-protecting the database).  When I searched for this problem- it seems to happen with a lot of projects that try to use a secure Access database, but most of them solve it by writing code or wrapping it in another programming package- none of which do I have access to.  I've written some VBA before- but I don't see anywhere in Infopath that you can insert VBA....

    Filed under:
  • 06-01-2011 08:28 AM In reply to

    Re: Trouble opening secure database

    Okay- I managed to fix it.  I used a modification of Microsoft Knowledge Base's article 823927- which tells you how to use .NET to fix it.  I fiddled around until I figured out where to put the same info in through Infopath.  The greyed out bits are the original instructions, the red parts are what I added: (you will get warnings that you are making your database less secure because of storing the password..not that it would matter to someone intent to break them- but I went in and changed the .odc files to 'hidden' after I was done as a small added precaution)

    How to get Infopath to open User-Level Secure Access Database to run Query

    1.       Start Microsoft Visual Studio .NET.   Open Infopath Form Template, Choose “Design This Form”2.       On the View menu, click Server Explorer. 3.       In Server Explorer, right-click Data Connections, and then click Add Connection. Tools >Data Connections > Modify4.       In the Data Link Properties dialog box, click the Provider tab. In the OLE DB Provider(s) list,  Select Database > “New Source” button , select ‘Other/Advanced’ click Microsoft Jet 4.0 OLE DB Provider, and then click Next, 5.       On the Connection tab, click the ellipsis button (...). 6.       In the Select Access Database dialog box, find the Northwind.mdb file in the following folder:  your database and path%Program Files%\Microsoft Office\Office10\Samples7.       Click Northwind.mdb, your database and then click Open. 8.       Uncheck “blank Password, check ‘allow saving’, enter a user and password for the program to use to access database (preferably a dummy account specifically for this use.  Set for whatever level of security you want it to have)9.       In the Data Link Properties dialog box, click the All tab. 10.    Click Jet OLEDB:System database, and then click Edit Value. 11.    In the Edit Property Value dialog box, type the path to your workgroup information file C:\Access Files\System1.mdw in the Property Value text box, and then click OK. 12.    Click User ID, and then click Edit Value. 13.    In the Edit Property Value dialog box, type testuser in the Property Value text box, and then click OK. 14.    Click Password, and then click Edit Value. 15.    In the Edit Property Value dialog box, type testuser in the Property Value text box, and then click OK. 16.    In the Data Link Properties dialog box, click OK. 17.    Re-select the tables you used for your program (or unselect the “connect to a specific table’ box to allow all tables to be used.)18.    In the Data Conneection Wizard, create a file name (be sure to browse to the same location as your program files) and meaningful description.  Check  ‘save password’ box, then click ‘Finish’19.    In the Please Enter MS JET OLE DB Initialization Information dialog box, type testuser in the Password text box, and then click OK. Select Data Source, make sure your new file is highlighted, hit “Open20.    Choose table when prompted, follow the same steps as when you first linked to the database to make sure you have all the tables you need.  When done click ‘next’.  “Close” when finished, and save your files.

    Double check functionality and use. 

    (Sorry- I tried to add better formatting to this- but it keeps mushing it back into a paragraph when I hit 'post')

Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.