<?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>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Problem Inserting and Updating Data</title><link>https://www.infopathdev.com:443/forums/thread/8796.aspx</link><pubDate>Sat, 14 Jan 2006 18:07:35 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:8796</guid><dc:creator>Lewis68</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/8796.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=8796</wfw:commentRss><description>Can I, in code, execute "New Record"? The same as the button.&lt;br /&gt;&lt;br /&gt;If I put a New Record button on the form, and hit it after the query returns nil, it will add a new record and allow me to enter into the fields. So all I need to do is execute a "New Record" in code.&lt;br /&gt;&lt;br /&gt;Any idea's?&lt;br /&gt;&lt;br /&gt;Thanks.</description></item><item><title>Re: Problem Inserting and Updating Data</title><link>https://www.infopathdev.com:443/forums/thread/8795.aspx</link><pubDate>Fri, 13 Jan 2006 17:31:35 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:8795</guid><dc:creator>Lewis68</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/8795.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=8795</wfw:commentRss><description>Hi Matt,&lt;br /&gt;&lt;br /&gt;However, it does have somewhere to go in the database, which is the same place it would go if the Query wasn't run, a New Record. If I did not call the Query, there would still not be a record in the database that the controls are bound to. How is that any different then if I call a query that returns no records? Forgive me, but I'm trying to understand the reason why it was designed this way.&lt;br /&gt;&lt;br /&gt;So I have to create two views with the same controls, one to Add records, and one to Edit them? One question I have: For the view that's tied to XML, how do I, in code, add a record to the db, and fill it with the fields in the XML file?&lt;br /&gt;&lt;br /&gt;Thanks for your help.&lt;br /&gt;</description></item><item><title>Re: Problem Inserting and Updating Data</title><link>https://www.infopathdev.com:443/forums/thread/8794.aspx</link><pubDate>Fri, 13 Jan 2006 16:51:11 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:8794</guid><dc:creator>Matt Faus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/8794.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=8794</wfw:commentRss><description>If you still want to get user input even though it has no where to go in the database, you could create two sections. One section (with controls tied to SQL) will be visible when the row is present, the other (with controls bound to XML schema) will be visible when no row is returned from the DB.  You would also want to modify your submit button.&lt;br /&gt;&lt;br /&gt;Hope this helps!&lt;br /&gt;&lt;br /&gt;---------------&lt;br /&gt;Matt Faus&lt;br /&gt;InfoPath Dev Texas&lt;br /&gt;</description></item><item><title>Re: Problem Inserting and Updating Data</title><link>https://www.infopathdev.com:443/forums/thread/8793.aspx</link><pubDate>Fri, 13 Jan 2006 16:39:58 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:8793</guid><dc:creator>Lewis68</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/8793.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=8793</wfw:commentRss><description>Hi Agni,&lt;br /&gt;&lt;br /&gt;Is there anyway around this?&lt;br /&gt;&lt;br /&gt;Thanks</description></item><item><title>Re: Problem Inserting and Updating Data</title><link>https://www.infopathdev.com:443/forums/thread/8792.aspx</link><pubDate>Fri, 13 Jan 2006 10:36:29 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:8792</guid><dc:creator>Agni Jonnalagadda</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/8792.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=8792</wfw:commentRss><description>Hi Lewis,&lt;br /&gt;If data that you are quering is not present in the DB then you will get zero rows from the DB. &lt;br /&gt;I guess your fields are directly bound to the DB returned data, if that is case when there is no data in the DB, controls that are bound to that fields will get disabled. Because in InfoPath controls do not exist without XML fields.&lt;br /&gt;&lt;br /&gt;Agni&lt;br /&gt;InfoPath Dev India</description></item><item><title>Re: Problem Inserting and Updating Data</title><link>https://www.infopathdev.com:443/forums/thread/8791.aspx</link><pubDate>Fri, 13 Jan 2006 07:35:58 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:8791</guid><dc:creator>Lewis68</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/8791.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=8791</wfw:commentRss><description>Anyone?</description></item><item><title>Problem Inserting and Updating Data</title><link>https://www.infopathdev.com:443/forums/thread/5266.aspx</link><pubDate>Thu, 12 Jan 2006 17:26:11 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:5266</guid><dc:creator>Lewis68</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/5266.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=5266</wfw:commentRss><description>Hello,&lt;br /&gt;&lt;br /&gt;I have a form that allows for inserting records in a SQL database. I also want it to query the database to find if the record exists. If it does I want to give the ability to update the data.&lt;br /&gt;&lt;br /&gt;The query works when the record exists. I can edit the data and submit it back to the database. However when the record doesn't exist and I query the database, all the fields become disabled.&lt;br /&gt;&lt;br /&gt;Is there any way around this?&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;</description></item></channel></rss>