<?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: Submit to SQL - Only specific pattern allowed</title><link>https://www.infopathdev.com:443/forums/thread/49929.aspx</link><pubDate>Tue, 15 Dec 2009 14:18:13 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:49929</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/49929.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=49929</wfw:commentRss><description>&lt;p&gt;Have you tried removing the pattern and adding logic to SQL to auto-increment the primary key?&lt;/p&gt;</description></item><item><title>Submit to SQL - Only specific pattern allowed</title><link>https://www.infopathdev.com:443/forums/thread/49825.aspx</link><pubDate>Wed, 09 Dec 2009 17:05:48 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:49825</guid><dc:creator>bretrowlinson</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/49825.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=49825</wfw:commentRss><description>&lt;p&gt;I have setup a sql table (just single table) with some columns, and one column for a primary key, that has a data type of &amp;#39;uniqueidentifier&amp;#39;, and has a default value of &amp;#39;(newsequentialid())&amp;#39;.&lt;/p&gt;
&lt;p&gt;Entering data from sql enterprise manager, I am able to create columns, and by leaving the primary key field empty, sql will auto-generate the guid when I save changes on the record.&lt;/p&gt;
&lt;p&gt;Next I setup a new infopath form&amp;nbsp;(I have tested in both 2003 and 2007), creating from database connection.&amp;nbsp; It brings over all the fields fine, including the primary key.&amp;nbsp; When I try to submit a new record I get an error on the primary key field &amp;quot;Only specific pattern allowed&amp;quot;.&amp;nbsp; This error occurs both if the primary key field is displayed on the form or not.&lt;/p&gt;
&lt;p&gt;Checking properties of the field, in the &amp;#39;details&amp;#39; it has the pattern:&amp;nbsp; &lt;/p&gt;
&lt;p&gt;Pattern: &amp;quot;\{[0-9A-F]{8,8}\-[0-9A-F]{4,4}\-[0-9A-F]{4,4}\-[0-9A-F]{4,4}\-[0-9A-F]{12,12}\}&amp;quot;&lt;/p&gt;
&lt;p&gt;So, it is requiring something that looks like a GUID.&amp;nbsp; This explains the error, but I was expecting that the InfoPath form would allow for no value to be collected there, and then just allow the DB to create the GUID.&amp;nbsp; This is behaviour that is mentioned (but relating to Acess specifically) in this article:&amp;nbsp; &lt;a href="http://office.microsoft.com/en-us/help/HA011199501033.aspx"&gt;http://office.microsoft.com/en-us/help/HA011199501033.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Is there a setting or option I am missing?&amp;nbsp; &lt;/p&gt;
&lt;p&gt;Any help with this would be greatly appreciated.&amp;nbsp; I want to avoid just auto-incrementing a number in the InfoPath form to use as a unique identifier.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Cheers!&lt;/p&gt;&lt;font size="1"&gt;&lt;/font&gt;&lt;font size="1"&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/font&gt;</description></item></channel></rss>