<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Displaying All Records from an ODBC Data Connection</title>
	<atom:link href="http://forms.stefcameron.com/2006/10/12/displaying-all-records-from-an-odbc-data-connection/feed/" rel="self" type="application/rss+xml" />
	<link>http://forms.stefcameron.com/2006/10/12/displaying-all-records-from-an-odbc-data-connection/</link>
	<description>Building intelligent forms using Adobe LiveCycle Designer</description>
	<lastBuildDate>Thu, 19 Jan 2012 16:32:12 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Stefan Cameron</title>
		<link>http://forms.stefcameron.com/2006/10/12/displaying-all-records-from-an-odbc-data-connection/#comment-6006</link>
		<dc:creator>Stefan Cameron</dc:creator>
		<pubDate>Fri, 01 Oct 2010 14:24:19 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/blog/?p=48#comment-6006</guid>
		<description>@Todd,

The first question to ask is whether you&#039;re using Acrobat or Reader when you add the data connection to the form. Seeing only the first record is often a sign that you&#039;re using Reader instead of Acrobat and therefore you can&#039;t use data connections unless you extend the PDF to allow &lt;a href=&quot;http://forms.stefcameron.com/2006/08/12/importing-data-in-acrobat/&quot; rel=&quot;nofollow&quot;&gt;data import&lt;/a&gt; in Reader.

Otherwise, you need a script that will loop through all records available via the connection and add instances of table rows with pertaining data. I have a sample of that in &lt;a href=&quot;http://forms.stefcameron.com/2006/10/12/displaying-all-records-from-an-odbc-data-connection/&quot; rel=&quot;nofollow&quot;&gt;this tutorial&lt;/a&gt;).</description>
		<content:encoded><![CDATA[<p>@Todd,</p>
<p>The first question to ask is whether you&#8217;re using Acrobat or Reader when you add the data connection to the form. Seeing only the first record is often a sign that you&#8217;re using Reader instead of Acrobat and therefore you can&#8217;t use data connections unless you extend the PDF to allow <a href="http://forms.stefcameron.com/2006/08/12/importing-data-in-acrobat/" rel="nofollow">data import</a> in Reader.</p>
<p>Otherwise, you need a script that will loop through all records available via the connection and add instances of table rows with pertaining data. I have a sample of that in <a href="http://forms.stefcameron.com/2006/10/12/displaying-all-records-from-an-odbc-data-connection/" rel="nofollow">this tutorial</a>).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Todd</title>
		<link>http://forms.stefcameron.com/2006/10/12/displaying-all-records-from-an-odbc-data-connection/#comment-6005</link>
		<dc:creator>Todd</dc:creator>
		<pubDate>Mon, 20 Sep 2010 16:03:30 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/blog/?p=48#comment-6005</guid>
		<description>Hello Stefan,

I read through your blog and I am little lost on how to make this work. I have been using LiveCycle Designer 8.2 for about a year now and am looking to improve on the Data collection area.

I did make a Data connection to my form, that works good, but with this form I need for the XML data to be imported in to Excel to send to our client. I have that figured out also.

If I do not do a data connection I import my data into excel and it shows everything from the PDF form, if I do it so the form HAS a data connection it will populate the Excel sheet with out having to clean up the spreadsheet and make it the way our client wants it.

My problem is with a data connection in the PDF Form it will only pull information from the first row and not the rows that you can add with the add rows button. If you could please help me out it make my life much easier when it come&#039;s to collecting the data.

Thank You</description>
		<content:encoded><![CDATA[<p>Hello Stefan,</p>
<p>I read through your blog and I am little lost on how to make this work. I have been using LiveCycle Designer 8.2 for about a year now and am looking to improve on the Data collection area.</p>
<p>I did make a Data connection to my form, that works good, but with this form I need for the XML data to be imported in to Excel to send to our client. I have that figured out also.</p>
<p>If I do not do a data connection I import my data into excel and it shows everything from the PDF form, if I do it so the form HAS a data connection it will populate the Excel sheet with out having to clean up the spreadsheet and make it the way our client wants it.</p>
<p>My problem is with a data connection in the PDF Form it will only pull information from the first row and not the rows that you can add with the add rows button. If you could please help me out it make my life much easier when it come&#8217;s to collecting the data.</p>
<p>Thank You</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefan Cameron</title>
		<link>http://forms.stefcameron.com/2006/10/12/displaying-all-records-from-an-odbc-data-connection/#comment-6004</link>
		<dc:creator>Stefan Cameron</dc:creator>
		<pubDate>Thu, 21 Jan 2010 22:11:11 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/blog/?p=48#comment-6004</guid>
		<description>Patrick Rodgers,

For #2, I&#039;m not sure what you mean by &quot;fails to work at the subform level&quot;. If you&#039;re having trouble finding the data connection, you can access it directly by specifying the data connection&#039;s name as a property on the xfa.sourceSet object.

For example, if your data connection was called &quot;myDataConnection&quot;, you could access it like this:

&lt;pre&gt;&lt;code&gt;// JavaScript:
var count = 0;
while (!xfa.sourceSet.myDataConnection.isEOF())
{
    count++;
    xfa.sourceSet.myDataConnection.next();
}&lt;/code&gt;&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Patrick Rodgers,</p>
<p>For #2, I&#8217;m not sure what you mean by &#8220;fails to work at the subform level&#8221;. If you&#8217;re having trouble finding the data connection, you can access it directly by specifying the data connection&#8217;s name as a property on the xfa.sourceSet object.</p>
<p>For example, if your data connection was called &#8220;myDataConnection&#8221;, you could access it like this:</p>
<pre><code>// JavaScript:
var count = 0;
while (!xfa.sourceSet.myDataConnection.isEOF())
{
    count++;
    xfa.sourceSet.myDataConnection.next();
}</code></pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick Rodgers</title>
		<link>http://forms.stefcameron.com/2006/10/12/displaying-all-records-from-an-odbc-data-connection/#comment-6003</link>
		<dc:creator>Patrick Rodgers</dc:creator>
		<pubDate>Tue, 19 Jan 2010 03:11:26 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/blog/?p=48#comment-6003</guid>
		<description>Had a duh moment and know can add fields.  Am using drop down boxes, for the moment, so question one is answered.

Still looking for advice on question 2.</description>
		<content:encoded><![CDATA[<p>Had a duh moment and know can add fields.  Am using drop down boxes, for the moment, so question one is answered.</p>
<p>Still looking for advice on question 2.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick Rodgers</title>
		<link>http://forms.stefcameron.com/2006/10/12/displaying-all-records-from-an-odbc-data-connection/#comment-6002</link>
		<dc:creator>Patrick Rodgers</dc:creator>
		<pubDate>Sun, 17 Jan 2010 22:46:39 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/blog/?p=48#comment-6002</guid>
		<description>Dear Stefan,

Got your form to work (thank you).

Have two questions.

1. Am trying to add entries to the subform (text box, drop down list, and a pair of radio buttons.  I can only get things to work with the four entries of yours.  Every attempt to add my own entries or rename yours, fails.  How does one add drop down lists and radio buttons?

2. Am trying to move this subform from form1 to the actual subform since I will be having another subform with similar lists but different information required to be entered.  Will need to do data filtering prior to the display of the subform.  while(xfa.sourceSet.nodes.item(nIndex).name != sDataConnectionName) fails to work at the subform level.

Any help would be appreciated.

Patrick</description>
		<content:encoded><![CDATA[<p>Dear Stefan,</p>
<p>Got your form to work (thank you).</p>
<p>Have two questions.</p>
<p>1. Am trying to add entries to the subform (text box, drop down list, and a pair of radio buttons.  I can only get things to work with the four entries of yours.  Every attempt to add my own entries or rename yours, fails.  How does one add drop down lists and radio buttons?</p>
<p>2. Am trying to move this subform from form1 to the actual subform since I will be having another subform with similar lists but different information required to be entered.  Will need to do data filtering prior to the display of the subform.  while(xfa.sourceSet.nodes.item(nIndex).name != sDataConnectionName) fails to work at the subform level.</p>
<p>Any help would be appreciated.</p>
<p>Patrick</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ebrahim</title>
		<link>http://forms.stefcameron.com/2006/10/12/displaying-all-records-from-an-odbc-data-connection/#comment-6001</link>
		<dc:creator>Ebrahim</dc:creator>
		<pubDate>Fri, 29 May 2009 08:23:08 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/blog/?p=48#comment-6001</guid>
		<description>Hello Stefan,

I have tried maybe now over 20 hours to get this working with various different setting and it just does not work for me.

- I can add a new subform quite easily to the existing flowed subform (i assume you mean &quot;form1&quot; which is the base form).

- I then create a new data connection with a different mysql query (because i want different data in the new sub form).

- Next I copy your code and paste it into a new subform called subform2. I also change the connection property from &quot;Dataconnection&quot; to &quot;DataConnection2&quot; to match my new data connection name.

- After this I change the add instance variable to match the name of my new subform and also update all the other variables and field names. I really double checked to see I am not missing anything.

- When I preview the document, the file does not load and seems to constantly load in an &quot;everlasting loop&quot;. I have no idea why this is happening. If i save the livecycle file and open it in adobe reader, nothing happens. I can see the file in my task manager process list. But the file is not actually opened.

please can you update your example so that it covers 2 or more subforms. I have wasted so much hours over this and I simply am getting no closer.</description>
		<content:encoded><![CDATA[<p>Hello Stefan,</p>
<p>I have tried maybe now over 20 hours to get this working with various different setting and it just does not work for me.</p>
<p>- I can add a new subform quite easily to the existing flowed subform (i assume you mean &#8220;form1&#8243; which is the base form).</p>
<p>- I then create a new data connection with a different mysql query (because i want different data in the new sub form).</p>
<p>- Next I copy your code and paste it into a new subform called subform2. I also change the connection property from &#8220;Dataconnection&#8221; to &#8220;DataConnection2&#8243; to match my new data connection name.</p>
<p>- After this I change the add instance variable to match the name of my new subform and also update all the other variables and field names. I really double checked to see I am not missing anything.</p>
<p>- When I preview the document, the file does not load and seems to constantly load in an &#8220;everlasting loop&#8221;. I have no idea why this is happening. If i save the livecycle file and open it in adobe reader, nothing happens. I can see the file in my task manager process list. But the file is not actually opened.</p>
<p>please can you update your example so that it covers 2 or more subforms. I have wasted so much hours over this and I simply am getting no closer.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefan Cameron</title>
		<link>http://forms.stefcameron.com/2006/10/12/displaying-all-records-from-an-odbc-data-connection/#comment-6000</link>
		<dc:creator>Stefan Cameron</dc:creator>
		<pubDate>Mon, 25 May 2009 19:23:07 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/blog/?p=48#comment-6000</guid>
		<description>Ebrahim,

You would have to first add a new subform into an existing flowed subform and name it &quot;Subform2&quot;. Then you would set its &quot;Object palette &gt; Binding tab &gt; Repeat Subform for Each Data Item property&quot; and set its related &quot;min property&quot; to zero. Then your &quot;_Subform2.addInstance(0);&quot; code should work.</description>
		<content:encoded><![CDATA[<p>Ebrahim,</p>
<p>You would have to first add a new subform into an existing flowed subform and name it &#8220;Subform2&#8243;. Then you would set its &#8220;Object palette > Binding tab > Repeat Subform for Each Data Item property&#8221; and set its related &#8220;min property&#8221; to zero. Then your &#8220;_Subform2.addInstance(0);&#8221; code should work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ebrahim</title>
		<link>http://forms.stefcameron.com/2006/10/12/displaying-all-records-from-an-odbc-data-connection/#comment-5999</link>
		<dc:creator>Ebrahim</dc:creator>
		<pubDate>Fri, 22 May 2009 09:31:46 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/blog/?p=48#comment-5999</guid>
		<description>Hello Stefan,

I found out my original problem, now for the next. I am no expert on coding so be easy on me.

The initialise takes place on the main form, and will populate a subform, now what happens if I want two subforms, and both have different data and each grows/shrinks independantly. How can I tell your script to do this. I tried the following:

I copied your code and used the line
var oNewPerson = _Subform1.addInstance(0);
in the first set of code

then i repeated the same code but this time used
var oNewPerson = _Subform2.addInstance(0);

Only the first list is working.

I also put the code into each subforms initialise code, but that did not show any results.</description>
		<content:encoded><![CDATA[<p>Hello Stefan,</p>
<p>I found out my original problem, now for the next. I am no expert on coding so be easy on me.</p>
<p>The initialise takes place on the main form, and will populate a subform, now what happens if I want two subforms, and both have different data and each grows/shrinks independantly. How can I tell your script to do this. I tried the following:</p>
<p>I copied your code and used the line<br />
var oNewPerson = _Subform1.addInstance(0);<br />
in the first set of code</p>
<p>then i repeated the same code but this time used<br />
var oNewPerson = _Subform2.addInstance(0);</p>
<p>Only the first list is working.</p>
<p>I also put the code into each subforms initialise code, but that did not show any results.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefan Cameron</title>
		<link>http://forms.stefcameron.com/2006/10/12/displaying-all-records-from-an-odbc-data-connection/#comment-5998</link>
		<dc:creator>Stefan Cameron</dc:creator>
		<pubDate>Wed, 20 May 2009 01:56:55 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/blog/?p=48#comment-5998</guid>
		<description>Lee,

The difference between XML data and ODBC data connections is that with ODBC, only a single record is loaded at a time in the bound fields. That&#039;s why I show, in this post&#039;s sample, how to iterate through all available records in the connection in order to display them all.</description>
		<content:encoded><![CDATA[<p>Lee,</p>
<p>The difference between XML data and ODBC data connections is that with ODBC, only a single record is loaded at a time in the bound fields. That&#8217;s why I show, in this post&#8217;s sample, how to iterate through all available records in the connection in order to display them all.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefan Cameron</title>
		<link>http://forms.stefcameron.com/2006/10/12/displaying-all-records-from-an-odbc-data-connection/#comment-5997</link>
		<dc:creator>Stefan Cameron</dc:creator>
		<pubDate>Wed, 20 May 2009 01:41:59 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/blog/?p=48#comment-5997</guid>
		<description>Brad,

Perhaps you could use my sample on &lt;a href=&quot;http://forms.stefcameron.com/2006/12/18/databases-inserting-updating-and-deleting-records/&quot; rel=&quot;nofollow&quot;&gt;inserting new records into a database&lt;/a&gt; to add the duplicate and then use my sample on &lt;a href=&quot;http://forms.stefcameron.com/2006/09/29/selecting-specific-database-records/&quot; rel=&quot;nofollow&quot;&gt;selecting specific records in a database&lt;/a&gt; to set a query on the data connection that sorts records by creation date (assuming you capture the date when you create records in the first place).</description>
		<content:encoded><![CDATA[<p>Brad,</p>
<p>Perhaps you could use my sample on <a href="http://forms.stefcameron.com/2006/12/18/databases-inserting-updating-and-deleting-records/" rel="nofollow">inserting new records into a database</a> to add the duplicate and then use my sample on <a href="http://forms.stefcameron.com/2006/09/29/selecting-specific-database-records/" rel="nofollow">selecting specific records in a database</a> to set a query on the data connection that sorts records by creation date (assuming you capture the date when you create records in the first place).</p>
]]></content:encoded>
	</item>
</channel>
</rss>

