Hi, I'm trying to use an Access db as a standalone secondary data source, i.e., packaged with the InfoPath template. I'm essentially doing what the author of Chapter 6 in the superb *Developing Solutions with Microsoft InfoPath* has described on p. 174.
When I publish the form to a SharePoint forms library and then attempt to open the form from SharePoint on an XP client and query the Access db I get an ugly "Please enter JET OLE DB Initialization Information" dialog requesting Username, Password, Provider String and Open Mode. I cannot figure out how to get around this problem. Others have had it, but the questions on the Microsoft forum went unanswered:
http://groups-beta.google.com/group/microsoft.public.infopath/search?hl=en&group=microsoft.public.infopath&q=%22jet+ole+db+initialization+information%22&qt_g=1Here's the steps I'm taking, followed by the resulting XML for the adoAdapter in my xsf file:
1. Select the Tools | Data Connections menu command.
2. Click Add, select Receive Data, and select Database.
3. click Select Database and navigate to the mdb file, then click Open.
4. Click Next, uncheck Automatically retrieve data, click Finish, then click Close.
5. Select the Tools | Resource Files menu command and add companies.mdb.
6. Close the form and open the xsf file in Notepad.
7. Search for "adoAdapter". In the connectionString attribute remove the path to "companies.mdb". Delete the path leading to the mdb file, leaving only "companies.mdb" (because it resides locally now in the xsn file).
8. Save and close the xsf file.
9. Republish the form.
<xsf:dataObject name="Companies" schema="Companies.xsd" initOnLoad="no">
<xsf:query>
<xsf:adoAdapter connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Password="";User ID=Admin;Data Source=companies.mdb;Mode=Share Deny None;Extended Properties="";Jet OLEDB:System database="";Jet OLEDB:Registry Path="";Jet OLEDB:Database Password="";Jet OLEDB:Engine Type=5;Jet OLEDB:Database Locking Mode=1;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Database Password="";Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False" commandText="select [Seibel AccountID] as [Seibel_AccountID],[TP Name] as [TP_Name],[Credited District] as [Credited_District],[Region],[ATU Account Manager Alias] as [ATU_Account_Manager_Alias],[x86 PCs] as [x86_PCs],[ID] from [Companies] as [Companies]" queryAllowed="yes" name="Companies"></xsf:adoAdapter>
</xsf:query>
</xsf:dataObject>
MORE INFO (edited after my original post): This may be a clue. If I navigate to the location where InfoPath downloads and unpacks the xsn file (e.g., C:\Documents and Settings\sharepointuser\Local Settings\Application Data\Microsoft\InfoPath\FormCache1\) and double-click the xsn file to run the form *I do not get the error*.
I also get the dialog when I select the Tools | Data Connections menu command in InfoPath and try to modify the existing "Companies" data connection.