<?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>Sat, 20 Mar 2010 21:36:17 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Stefan Cameron</title>
		<link>http://forms.stefcameron.com/2006/10/12/displaying-all-records-from-an-odbc-data-connection/comment-page-1/#comment-64661</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-64661</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-page-1/#comment-64490</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-64490</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-page-1/#comment-64424</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-64424</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-page-1/#comment-49260</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-49260</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-page-1/#comment-49010</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-49010</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-page-1/#comment-48786</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-48786</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-page-1/#comment-48627</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-48627</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-page-1/#comment-48622</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-48622</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>
	<item>
		<title>By: Ebrahim</title>
		<link>http://forms.stefcameron.com/2006/10/12/displaying-all-records-from-an-odbc-data-connection/comment-page-1/#comment-48582</link>
		<dc:creator>Ebrahim</dc:creator>
		<pubDate>Tue, 19 May 2009 15:22:21 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/blog/?p=48#comment-48582</guid>
		<description>Hi Stefan, 

No Stefan thats not what I want to do:

My pdf form must have 4 rows no matter what, if it does not have 4 rows then the form will not look right. These 4 rows need to remain on the page no matter what. They need to retrieve data from my excel table (which can have 0-infinite rows) I need my 4 rows in my pdf to pick up the first 4 excel rows, and then I any additional rows in my excel document to be output to the pdf document. If there is 0-3 entries in my excel table, then I still want to output 4 rows, even if some of them are empty. I hope this makes sense!

I have been stuck on this for what seems forever now, so I really hope you an help.</description>
		<content:encoded><![CDATA[<p>Hi Stefan, </p>
<p>No Stefan thats not what I want to do:</p>
<p>My pdf form must have 4 rows no matter what, if it does not have 4 rows then the form will not look right. These 4 rows need to remain on the page no matter what. They need to retrieve data from my excel table (which can have 0-infinite rows) I need my 4 rows in my pdf to pick up the first 4 excel rows, and then I any additional rows in my excel document to be output to the pdf document. If there is 0-3 entries in my excel table, then I still want to output 4 rows, even if some of them are empty. I hope this makes sense!</p>
<p>I have been stuck on this for what seems forever now, so I really hope you an help.</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-page-1/#comment-48292</link>
		<dc:creator>Stefan Cameron</dc:creator>
		<pubDate>Fri, 15 May 2009 15:14:55 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/blog/?p=48#comment-48292</guid>
		<description>Ebrahim,

I&#039;m not sure I understand your question. Are you wanting the first 4 rows to be on a page of their own?</description>
		<content:encoded><![CDATA[<p>Ebrahim,</p>
<p>I&#8217;m not sure I understand your question. Are you wanting the first 4 rows to be on a page of their own?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
