<?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: Formatting Expression Box Formula's</title><link>https://www.infopathdev.com:443/forums/thread/23448.aspx</link><pubDate>Thu, 04 Oct 2007 14:22:23 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:23448</guid><dc:creator>adamrharding</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/23448.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=23448</wfw:commentRss><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I have just tried this by putting values of 00001 A 1/1/07; 00002 B 2/1/07; 00003 C 3/1/07 and 00004 D 4/1/07 into a three column database as you suggested&lt;/p&gt;
&lt;p&gt;I added a query field, a submit button, and an expression box with your function.&amp;nbsp; The problem lies with you treating @Claim_Number as an integer when you max() it or even when you&amp;nbsp;+ 1, or even + 00001&amp;nbsp;as such it displays just that, it as a number.&lt;/p&gt;
&lt;p&gt;Take off the max() and the + 1 and the correct text value is displayed in full.&lt;/p&gt;
&lt;p&gt;If, as I am guessing this is to find the next available number then maybe make @Claim_Number the primary key and have it auto-increment.&amp;nbsp; Just asking but why does the field &lt;strong&gt;need&lt;/strong&gt; to be formatted with the leading &amp;quot;0000&amp;quot; ?&lt;/p&gt;
&lt;p&gt;Cheers Adam&lt;/p&gt;</description></item><item><title>Formatting Expression Box Formula's</title><link>https://www.infopathdev.com:443/forums/thread/22914.aspx</link><pubDate>Fri, 07 Sep 2007 13:11:27 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:22914</guid><dc:creator>Monte Cristo</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/22914.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=22914</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have a database with one table, it has three coloumns, (1) a simple number format 0001, 0002, 0003 &amp;amp; so on....[text format&amp;nbsp;in access]&amp;nbsp;(2) Name [text format in access] (3) date [date format in access]&lt;/p&gt;
&lt;p&gt;So I have connected this database as my main connection and this all works.&lt;/p&gt;
&lt;p&gt;I have an expression box which queries the database coloumn (1) but the expression box returs the value without the 0&amp;#39;s so all I get is 3, 4, 5 etc.&lt;/p&gt;
&lt;p&gt;This is the formula in the expression box: &lt;strong&gt;concat(&lt;u&gt;Year&lt;/u&gt;, &amp;quot;-&amp;quot;, &lt;u&gt;ProductLine&lt;/u&gt;, &amp;quot;-&amp;quot;, max(&lt;u&gt;@Claim_Number&lt;/u&gt;) + 1) &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;BTW - @Claim_Number is the one querying the database coloumn (1)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Can anyone please tell me how I can return the values of coloumn (1) with the leading zeros? I have tried to change the format of the coloumn in access to a number (long integer) still not returning the values with the leading zero&amp;#39;s.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;</description></item></channel></rss>