<?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: Retrieving data from databases</title><link>https://www.infopathdev.com:443/forums/thread/17410.aspx</link><pubDate>Fri, 24 Nov 2006 17:06:25 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:17410</guid><dc:creator>Agni Jonnalagadda</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/17410.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=17410</wfw:commentRss><description>Hi Micky,&lt;br /&gt;I would suggest you write some code to retieve the Email address.&lt;br /&gt;1. Take a DB Data connection from the InfoPath design mode&lt;br /&gt;2. Write an OnAfterChangeEvent for the textbox field.&lt;br /&gt;3. Get reference to the data connection created in step 1.&lt;br /&gt;ADOAdapter2 adoAdapter = (ADOAdapter2)thisXDocument.DataAdapters["Data Connection Name"];&lt;br /&gt;//retrieve value from the textbox and prepare you query here&lt;br /&gt;adoAdapter.Command = "Write your Query here";&lt;br /&gt;adoAdapter.Query();&lt;br /&gt;&lt;br /&gt;4. You can get your email address this way&lt;br /&gt;IXMLDOMDocument2 ixmlDOMDocument = (IXMLDOMDocument2)thisXDocument.GetDOM("Data Connection Name");&lt;br /&gt;ixmlDOMDocument.setProperty("SelectionNamespaces", "Give required namespaces here");&lt;br /&gt;ixmlDOMDocument.selectSingleNode("Xpath to the email address");</description></item><item><title>Re: Retrieving data from databases</title><link>https://www.infopathdev.com:443/forums/thread/17409.aspx</link><pubDate>Tue, 21 Nov 2006 08:52:31 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:17409</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/17409.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=17409</wfw:commentRss><description>Hi Micky and welcome!&lt;br /&gt;&lt;br /&gt;How many postcodes do you have in your country? This could be a long query. You probably don't want to pull all of these down into a dropdown since it will be too hard to search the list. My suggestion would be to have them enter a value and then query the second table (Local District Office E-mail addresses) and display that. That means the user will have to know the postcode, but that is probably a safe assumption.&lt;br /&gt;&lt;br /&gt;To do this, unfortunately, in InfoPath there is no way to pass a parameter to a SQL query. You will either a) have to write some code, or b) use a Web service. We have a Web service that allows you to filter SQL queries based on values without requiring code. &lt;br /&gt;&lt;br /&gt;Send me e-mail, if you'd like to try our Web service.&lt;br /&gt;&lt;br /&gt;Regards,</description></item><item><title>Retrieving data from databases</title><link>https://www.infopathdev.com:443/forums/thread/16857.aspx</link><pubDate>Mon, 20 Nov 2006 10:09:59 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:16857</guid><dc:creator>micky_maccaff</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/16857.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=16857</wfw:commentRss><description>I have 2 tables that need to be linked.&lt;br /&gt;&lt;br /&gt;First table that needs to be linked is a Postcodes Table, with all the postcodes in the country.&lt;br /&gt;&lt;br /&gt;The second table has a list of email addresses from all the local district offices.&lt;br /&gt;&lt;br /&gt;The link between these 2 tables is a field called cost center.&lt;br /&gt;&lt;br /&gt;What I am trying to do is pull out an email address of a district office after entering a Postcode into a text box then clicking on a button, linking the 2 tables using the cost center.&lt;br /&gt;&lt;br /&gt;How can I do this?&lt;br /&gt;&lt;br /&gt;(Thanks for your help in advance).</description></item></channel></rss>