<?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: Information Lookup Ex, Query results display</title><link>https://www.infopathdev.com:443/forums/thread/17114.aspx</link><pubDate>Thu, 02 Feb 2006 00:02:26 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:17114</guid><dc:creator>lxhiss</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/17114.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=17114</wfw:commentRss><description>Guys thanks for your responses. I didn't end up getting that onchange event to work. I did however manage to use the new from Data Connection Wizard and click a button to retrieve data into the appropriate fields. I ended up having to publish a new library for the forms. Thank you all the same</description></item><item><title>Re: Information Lookup Ex, Query results display</title><link>https://www.infopathdev.com:443/forums/thread/17113.aspx</link><pubDate>Thu, 29 Dec 2005 17:47:32 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:17113</guid><dc:creator>Shanthi Reddy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/17113.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=17113</wfw:commentRss><description>If you want the OnAfterChange function in code then here are steps to follow&lt;br /&gt;&lt;br /&gt;To Add an OnAfterChange event&lt;br /&gt;1. Right click on the control and click on Show Data source&lt;br /&gt;2. Double click on the node selected in the Data source task pane&lt;br /&gt;3. In the window that opens click on Validations and Event handler tab&lt;br /&gt;4. In the Event Handlers dropdown select the OnAfterChange event and click on edit&lt;br /&gt;&lt;br /&gt;This will create the neccesary entries and open the OnAfterChange event in code for that node.&lt;br /&gt;&lt;br /&gt;Shanthi&lt;br /&gt;InfoPath Dev India</description></item><item><title>Re: Information Lookup Ex, Query results display</title><link>https://www.infopathdev.com:443/forums/thread/17112.aspx</link><pubDate>Thu, 29 Dec 2005 06:30:18 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:17112</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/17112.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=17112</wfw:commentRss><description>Hi Lucian and welcome,&lt;br /&gt;In the InfoPath Designer, go to the taskpane and select the secondary data source that you are retrieving information from. Right click on the field that holds the value of the data downloaded from your SQL database. Choose Properties. Select Rules tab. Click Add. Click Add Action. Select "Set a Field's Value". Click the icon next to the Field and select hte field to set from the main data source. Click on the fX button and insert a field. Choose the default (same as the secondary data source field). Click OK until you escape from dialog box hell. Preview the form.&lt;br /&gt;&lt;br /&gt;Patrick Halstead [InfoPath MVP]&lt;br /&gt;InfoPathDev</description></item><item><title>Information Lookup Ex, Query results display</title><link>https://www.infopathdev.com:443/forums/thread/16766.aspx</link><pubDate>Thu, 22 Dec 2005 05:48:06 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:16766</guid><dc:creator>lxhiss</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/16766.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=16766</wfw:commentRss><description>I'm attempting to replicate the functionality of the Information Lookup example in the Infopath 2003 SDK but having a few issues.&lt;br /&gt;&lt;br /&gt;I have no problem displaying a list of names in a drop down box but on selecting the name how do I get it to copy values back onto the form. I'm connecting to a SQL database&lt;br /&gt;&lt;br /&gt;I'm attempting to copy the function msoxd__method::OnAfterChange(eventObj. But I don't understand where to define the function  and what the msoxd__method means/cames from in the example. How do I put code into an on change event for a particular field.&lt;br /&gt;&lt;br /&gt;The function I'm assuming I need to replicate from the sample is&lt;br /&gt;&lt;br /&gt;function msoxd__method::OnAfterChange(eventObj)&lt;br /&gt;{&lt;br /&gt;	if ((eventObj.IsUndoRedo) || (eventObj.Operation == "Delete"))&lt;br /&gt;		return;&lt;br /&gt;&lt;br /&gt;	var objShippingCompanyNode = null;&lt;br /&gt;	var objCompanyNode = null;&lt;br /&gt;&lt;br /&gt;	// Get the current shipping company name&lt;br /&gt;	objShippingCompanyNode = XDocument.DOM.selectSingleNode("/liSample/shipping/company");&lt;br /&gt;&lt;br /&gt;	if (objShippingCompanyNode.text)&lt;br /&gt;	{&lt;br /&gt;		// Search in the secondary data source for a shipping company with&lt;br /&gt;		// this name that delivers via the newly selected method&lt;br /&gt;		objCompanyNode = XDocument.GetDOM("Shipping Companies").selectSingleNode("/shippingCompanyList/"&lt;br /&gt;			+ "company[@name='" + objShippingCompanyNode.text + "' and @method='" + eventObj.NewValue + "']");&lt;br /&gt;&lt;br /&gt;		// If no company node was found, clear the company field because&lt;br /&gt;		// because it must not be a valid entry in the dropdown list&lt;br /&gt;		// for the new shipping method.&lt;br /&gt;		if (!objCompanyNode)&lt;br /&gt;			objShippingCompanyNode.text = "";&lt;br /&gt;	}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Any help would be much appreciated.&lt;br /&gt;&lt;br /&gt;Cheers&lt;br /&gt;&lt;br /&gt;Lucian</description></item></channel></rss>