<?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>Web Services</title><link>https://www.infopathdev.com:443/forums/48.aspx</link><description> </description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Problem trying to update a dataset</title><link>https://www.infopathdev.com:443/forums/thread/17666.aspx</link><pubDate>Fri, 19 Aug 2005 03:55:06 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:17666</guid><dc:creator>Agni Jonnalagadda</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/17666.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=48&amp;PostID=17666</wfw:commentRss><description>From Annie in Email&lt;br /&gt;&lt;br /&gt;You asked me if I am trying to update the database or the infopath form.&lt;br /&gt;I am actually trying to do both. I am trying to update the fields in the&lt;br /&gt;infopath form and i assumed that once i click the submit button it will update&lt;br /&gt;the database as well. But unfortunately it doesn't do either.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Please if you have any suggestions as to how I can fix this problem please let&lt;br /&gt;me know&lt;br /&gt;&lt;br /&gt;**************************************&lt;br /&gt;REPLY&lt;br /&gt;&lt;br /&gt;How do you want to update the database?&lt;br /&gt;Are you submitting data back to webservice?&lt;br /&gt; or are you writing code using SqlConnection to submit data to database directly?&lt;br /&gt;&lt;br /&gt;Can you give the code that you are using to update the dataset in InfoPath and code to update the Database here. By looking at you code i might get some idea.&lt;br /&gt;&lt;br /&gt;Agni&lt;br /&gt;InfoPath Dev India</description></item><item><title>Re: Problem trying to update a dataset</title><link>https://www.infopathdev.com:443/forums/thread/17665.aspx</link><pubDate>Wed, 17 Aug 2005 19:08:22 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:17665</guid><dc:creator>Agni Jonnalagadda</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/17665.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=48&amp;PostID=17665</wfw:commentRss><description>Hi Annie2002,&lt;br /&gt;Welcome to the Forum!&lt;br /&gt;I sorry I did not understand your problem fully, Do you want to update data in the InfoPath or the data in the database? &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Agni&lt;br /&gt;InfoPath Dev India</description></item><item><title>Problem trying to update a dataset</title><link>https://www.infopathdev.com:443/forums/thread/17477.aspx</link><pubDate>Tue, 16 Aug 2005 19:33:01 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:17477</guid><dc:creator>Annie2002</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/17477.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=48&amp;PostID=17477</wfw:commentRss><description>I have created a table (CUSTOMERS) in the SQL database with the following parameters:&lt;br /&gt;&lt;br /&gt;Name           datatype     length&lt;br /&gt;CustomerID       int        4 &lt;br /&gt;CustomerName    varchar    50&lt;br /&gt;CustomerAddress varchar    250&lt;br /&gt;&lt;br /&gt;I'm using a stored procedure: GetCustomersbyID:&lt;br /&gt;&lt;br /&gt;Alter procedure dbo.GetCustomersbyID&lt;br /&gt; @id int&lt;br /&gt;&lt;br /&gt;AS&lt;br /&gt; select * from  Customers &lt;br /&gt;where CustomerID = @id&lt;br /&gt;return&lt;br /&gt;&lt;br /&gt;I then use a web service to retrieve this dataset which is displayed on a dropdown list in an infopath form from which you can select a customer name and once the name is selected the rest of the fields are populated using the customerID. The problem i am having is that i don't know to update this dataset to reflect the changes to this dataset&lt;br /&gt;&lt;br /&gt;I tried the following:&lt;br /&gt;I created a stored procedure "UpdateCustomer":&lt;br /&gt;ALTER PROCEDURE dbo.UpdateCustomers&lt;br /&gt;&lt;br /&gt;@id int,&lt;br /&gt;@customername varchar(50),&lt;br /&gt;@customeraddress varchar(250),&lt;br /&gt;&lt;br /&gt;UPDATE Customers&lt;br /&gt;SET  Custo CustomerName = @customername, CustomerAddress = @customeraddress&lt;br /&gt;WHERE CustomerID = @id &lt;br /&gt;&lt;br /&gt;Then i use the following web service code:&lt;br /&gt;public void update (DataSet ds)&lt;br /&gt;{&lt;br /&gt;  sqlConnection1.open();&lt;br /&gt;  sqlDataAdapater1.update(ds);&lt;br /&gt;  sqlConnection1.close();&lt;br /&gt;}&lt;br /&gt;The sqlDataAdapter is configured with the storedprocedure GetCustomersbyID for the select command and UpdateCustomers for the update command&lt;br /&gt;&lt;br /&gt;Then in the infopath form i use the update function for the main submit and geCustomerbyID function for the main query. But this just doesnot update the database when i make changes to the fields in the form and submit&lt;br /&gt;&lt;br /&gt;If anyone has any suggestions please let me know i'm really struggling with this&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;</description></item></channel></rss>