<?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: How do I submit data of web-enabled form via webservice to sql</title><link>https://www.infopathdev.com:443/forums/thread/21361.aspx</link><pubDate>Mon, 02 Jul 2007 04:45:12 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:21361</guid><dc:creator>stevanus.hk</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/21361.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=48&amp;PostID=21361</wfw:commentRss><description>&lt;p&gt;you need to pass&amp;nbsp;value to your&amp;nbsp; parameter, try to create webmethod with parameter, in vb i usually create like this: &lt;/p&gt;&lt;p&gt;public sub submitdata(byval firstName as string, byval lastName as string)&lt;/p&gt;&lt;p&gt;&amp;#39;your query here&amp;#39;&lt;/p&gt;&lt;p&gt;end sub&lt;/p&gt;&lt;p&gt;in this sub you need to assign value from procedure ex firstName to your query parameter ex @firstName. because i see you didn&amp;#39;t pass value for your sql parameter&lt;/p&gt;&lt;p&gt;if this work try to open your web service and invoke that.&lt;/p&gt;</description></item><item><title>Re: How do I submit data of web-enabled form via webservice to sql</title><link>https://www.infopathdev.com:443/forums/thread/20426.aspx</link><pubDate>Tue, 05 Jun 2007 19:25:04 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:20426</guid><dc:creator>bjoernscher</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/20426.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=48&amp;PostID=20426</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;&lt;p&gt;thanks for your reply. I now found the reason but not the solution.&lt;/p&gt;&lt;p&gt;In the submit webmethod of the webservice, I only updated the sqldataadapter but did not run any insert code for sql.&lt;/p&gt;&lt;p&gt;The sqldataadapter already created the insert command by itself when adding the sqldataadapter to the webservice.&lt;/p&gt;&lt;p&gt;But when I try to submit the data, i get the failure message :&lt;/p&gt;&lt;p&gt;System.Data.SqlClient.SqlException: The parameterized query &amp;#39;(@Firstname nchar(4000),@Lastname nchar(4000))INSERT INTO [timet&amp;#39; expects the parameter &lt;a href="mailto:&amp;#39;@Firstname&amp;#39;"&gt;&amp;#39;@Firstname&amp;#39;&lt;/a&gt;, which was not supplied.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Here is the WebMethod to submit to the database and the SqlInsertCommand.&lt;/p&gt;&lt;p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/p&gt;&lt;font size="2"&gt;&lt;font size="2"&gt;&lt;p&gt;[WebMethod] // A method to expose on the Web service&lt;/p&gt;&lt;p&gt;public DataSet SubmitDataSet(DataSet ds) &lt;br /&gt;{&lt;/p&gt;&lt;p&gt;InitializeComponent(); &lt;/p&gt;&lt;p&gt;sqlConnection1.Open();&lt;/p&gt;&lt;p&gt;sqlInsertCommand1.ExecuteNonQuery();&lt;/p&gt;&lt;p&gt;sqlConnection1.Close();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;return ds; &lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;// sqlInsertCommand1&lt;/p&gt;&lt;p&gt;this.sqlInsertCommand1.CommandText = &amp;quot;INSERT INTO [timetrack] ([Firstname], [Lastname]) VALUES (@Firstname, @Lastname)&amp;quot;; &lt;/p&gt;&lt;p&gt;this.sqlInsertCommand1.Connection = this.sqlConnection1; &lt;/p&gt;&lt;p&gt;this.sqlInsertCommand1.Parameters.AddRange(new System.Data.SqlClient.SqlParameter[] { &lt;/p&gt;&lt;p&gt;new System.Data.SqlClient.SqlParameter(&amp;quot;@Firstname&amp;quot;, System.Data.SqlDbType.NChar, 0, &amp;quot;Firstname&amp;quot;), &lt;/p&gt;&lt;p&gt;new System.Data.SqlClient.SqlParameter(&amp;quot;@Lastname&amp;quot;, System.Data.SqlDbType.NChar, 0, &amp;quot;Lastname&amp;quot;)}); &lt;/p&gt;&lt;p&gt;// &lt;/p&gt;&lt;p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;p&gt;Can&amp;nbsp;you see, where the failure is hidden??&lt;/p&gt;&lt;p&gt;The web-form of Infopath has only two text-boxes to type in a firstname and a lastname...&lt;/p&gt;&lt;p&gt;Should be a simple webservice but is already a 2 weeks project now. Would be great if you can help me find&amp;nbsp;a solution.&lt;/p&gt;</description></item><item><title>Re: How do I submit data of web-enabled form via webservice to sql</title><link>https://www.infopathdev.com:443/forums/thread/20369.aspx</link><pubDate>Mon, 04 Jun 2007 17:14:43 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:20369</guid><dc:creator>davidair</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/20369.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=48&amp;PostID=20369</wfw:commentRss><description>&lt;p&gt;Well, if InfoPath does not complain, it looks like the problem could be on the webservice side. I would recommend attaching the VS debugger to your IIS process (it&amp;#39;s w3wp on .NET Server/Vista, don&amp;#39;t recall off the top of my head what it is in XP), putting a breakpoint in your webmethod and making sure it does what you expect it to do when InfoPath hits it (verify the parameters from InfoPath are what you&amp;#39;ve expected them to be).&lt;/p&gt;&lt;p&gt;Good luck debugging!&lt;/p&gt;</description></item><item><title>How do I submit data of web-enabled form via webservice to sql</title><link>https://www.infopathdev.com:443/forums/thread/20351.aspx</link><pubDate>Mon, 04 Jun 2007 13:32:26 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:20351</guid><dc:creator>bjoernscher</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/20351.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=48&amp;PostID=20351</wfw:commentRss><description>&lt;div class="ForumPostContentText" id="ctl00_ctl01_bcr_ctl00___PostRepeater_ctl01_PostViewWrapper"&gt;I have set up a web service (using Visual Studio 2005) to send data to a SQL 2005&amp;nbsp;database.&lt;br /&gt;&lt;br /&gt;I&amp;nbsp;created a new web-enabled InfoPath Form with Submit/Receive functions. I have added a submit button to the form, and set submit up to submit to the web service. &lt;br /&gt;&lt;br /&gt;When I hit &amp;quot;Run query&amp;quot;, Infopath successfully queries the databases and shows me its tabel entries. But when I fill in the form and submit the data, it doesn&amp;#39;t go into the SQL database, although InfoPath tells me that is successfully submitted the data.&lt;br /&gt;&lt;br /&gt;What am I doing wrong? &lt;/div&gt;</description></item></channel></rss>