<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>SQL Database Integration</title><link>https://www.infopathdev.com:443/forums/47.aspx</link><description>For questions concerning issues in the integration of SQL and Microsoft InfoPath.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Submitting and Retrieving from a database</title><link>https://www.infopathdev.com:443/forums/thread/17286.aspx</link><pubDate>Mon, 22 May 2006 15:36:46 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:17286</guid><dc:creator>chipdavis</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/17286.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=17286</wfw:commentRss><description>Thanks for the information.  I ended up adding a rule under "Form Options - Save and Open" to run a query when the file is opended.  The query runs and fills the form with the information from the database.  So far, it seems to be working.&lt;br /&gt;&lt;br /&gt;I might try out the OnLoad event just to see how that works.  When I created the form I selected "New form from a data connection."&lt;br /&gt;&lt;br /&gt;Note: I did select "auto retrieve data when the form is opened," but when I open the SharePoint form (and don't run a query), I can't update the database.&lt;br /&gt;&lt;br /&gt;Thanks again for your help.&lt;br /&gt;&lt;br /&gt;Chip</description></item><item><title>Re: Submitting and Retrieving from a database</title><link>https://www.infopathdev.com:443/forums/thread/17285.aspx</link><pubDate>Mon, 22 May 2006 14:29:13 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:17285</guid><dc:creator>Abhishek</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/17285.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=17285</wfw:commentRss><description>Hi ChipDavis,&lt;br /&gt;When u create a data connection to ur database,there is a checkbox available in the final stage.&lt;br /&gt;"Automatically retrieve data when the form is opened".&lt;br /&gt;Checking this will enable u to retrieve data when the form opens.&lt;br /&gt;Another option is to use code in the onload event of the form.&lt;br /&gt;In the Tools menu, select Programming --&amp;gt;OnLoad Event.&lt;br /&gt;In ur eventhandler,write the following code&lt;br /&gt;thisXDocument.DataObjects["&amp;lt;DataConnection Name&amp;gt;"].Query();&lt;br /&gt;&lt;br /&gt;How did u create this form?&lt;br /&gt;"New blank form" or "New from a data connection?"</description></item><item><title>Re: Submitting and Retrieving from a database</title><link>https://www.infopathdev.com:443/forums/thread/17284.aspx</link><pubDate>Fri, 19 May 2006 14:13:52 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:17284</guid><dc:creator>chipdavis</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/17284.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=17284</wfw:commentRss><description>I have an Access table set up with a primary key.  When I open the form stored in the SharePoint library, I am changing a value other than the key.  If I save the form, the table is not updated (only the SharePoint form is updated).  If I submit the form, InfoPath is trying to insert a new row into the Access table instead of updating the existing row.&lt;br /&gt;&lt;br /&gt;Is there a way I can run a query against the database when I open the form from the SharePoint library (repopulate the form with the database values)?  I need to somehow tie the SharePoint document/form to the database record that was already saved.  I want this to happen automatically when I open the document so I don't have to manually run a query.&lt;br /&gt;&lt;br /&gt;Chip</description></item><item><title>Re: Submitting and Retrieving from a database</title><link>https://www.infopathdev.com:443/forums/thread/17283.aspx</link><pubDate>Fri, 19 May 2006 05:49:51 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:17283</guid><dc:creator>Abhishek</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/17283.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=17283</wfw:commentRss><description>Hi ChipDavis,&lt;br /&gt;&lt;br /&gt;The primary key for every row should be unique.&lt;br /&gt;Are u by any chance repeating this primary key for any of ur rows when u update and resubmit the form.&lt;br /&gt;Give unique values for the primary key field before u resubmit and let me know.&lt;br /&gt;Regards,&lt;br /&gt;Abhishek</description></item><item><title>Submitting and Retrieving from a database</title><link>https://www.infopathdev.com:443/forums/thread/16811.aspx</link><pubDate>Thu, 18 May 2006 21:06:08 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:16811</guid><dc:creator>chipdavis</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/16811.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=16811</wfw:commentRss><description>I would like to fill out an InfoPath form on SharePoint and submit the form to a SharePoint library and a database (Access for now, SQL Server in the future).  Once the form is submitted, I want to open the form from the SharePoint library and reestablish the data connection with the record in the database.  That way I can make changes to the form in the SharePoint library and UPDATE the database with the new values.&lt;br /&gt;&lt;br /&gt;So far, I have been able to submit the form to the SharePoint library and the database.  However, if I want to update some values on an existing form by opening the SharePoint library form, the database does not update with the new values when I save.  If I change a field value and try to resubmit, I get a duplicate row insert error (I'm trying to update, not insert).&lt;br /&gt;&lt;br /&gt;Note: I don#%92t want to select a “query” button when I enter the form.&lt;br /&gt;&lt;br /&gt;Any ideas on how this works?&lt;br /&gt;&lt;br /&gt;Thanks.&lt;br /&gt;&lt;br /&gt;Chip&lt;br /&gt;</description></item></channel></rss>