<?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: Form won't return data from a sql stored procedure</title><link>https://www.infopathdev.com:443/forums/thread/17354.aspx</link><pubDate>Thu, 18 Jan 2007 18:05:11 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:17354</guid><dc:creator>Tome</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/17354.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=17354</wfw:commentRss><description>I#%92ve been running into the same problem but only at a certain point.&lt;br /&gt;&lt;br /&gt;The user selects a Business Unit ID and a Contract #, then clicks the "New SR Number" button, as shown in the form screen shot below. A stored procedure is called and run to calculate the sequential number where it returns the new service receipt record. All seems to work well; I can change the header information and submit. I see the error when I insert records into any of the associated tables like employees or equipment and then try to submit.&lt;br /&gt;&lt;br /&gt;I have access to modify the Stored procedure which I have been attempting to do but without success. I'm fairly new to SQL Server so there are some uncertainties on my end. I can post the SQL statement if it would help.&lt;br /&gt;&lt;br /&gt;It appears to me that SQL server is not returning the schema for the associated tables. If this is the case, how do I go about making the schema match? Does anyone have any websites that would help me?&lt;br /&gt;&lt;br /&gt;Here is what my main connection looks like.&lt;br /&gt;&lt;img src='http://www.condordataserver.com/images/MainDataConnection.jpg' border='0' /&gt;&lt;br /&gt;&lt;br /&gt;Here is the form.&lt;br /&gt;&lt;img src='http://www.condordataserver.com/images/Form_Pre_Submit.jpg' border='0' /&gt;&lt;br /&gt;</description></item><item><title>Re: Form won't return data from a sql stored procedure</title><link>https://www.infopathdev.com:443/forums/thread/17353.aspx</link><pubDate>Thu, 31 Aug 2006 20:06:32 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:17353</guid><dc:creator>Matt Faus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/17353.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=17353</wfw:commentRss><description>Ouch, it looks like the difference between "C" and "c" is getting you.  Is there any way you can alter the SPROC to make sure that it returns a column name consistently? Otherwise, you could extract the form files and change the schema file for this secondary data connection, or alter the XML that is returned by the SPROC in code manually.&lt;br /&gt;&lt;br /&gt;I hope this gives you some direction, I know its pretty vague, but I think this is the direction you should take.</description></item><item><title>Form won't return data from a sql stored procedure</title><link>https://www.infopathdev.com:443/forums/thread/16835.aspx</link><pubDate>Tue, 25 Jul 2006 17:52:30 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:16835</guid><dc:creator>magee8706</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/16835.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=16835</wfw:commentRss><description>Hello --&lt;br /&gt;&lt;br /&gt;I'm trying to do something very simple.  All I want is a button to run a stored procedure and return the data to the form and I get an error every time.  Below is the code I'm using and the error I get.  Any ideas?  FYI - I have applied the Office 2003 service pack 2 that says is supposed to get rid of this error.&lt;br /&gt;thanks.&lt;br /&gt;&lt;br /&gt;The stored procedure just selects all the fields from a table where certain fields are null.&lt;br /&gt;&lt;br /&gt;function CTRL37_7::OnClick(eventObj)&lt;br /&gt;{&lt;br /&gt;			&lt;br /&gt;//Set the Command for the Query Adapter of the Data Source. &lt;br /&gt;XDocument.QueryAdapter.Command = "execute sp_it_NewCallTickets"; &lt;br /&gt; &lt;br /&gt;//Query the Data Source. &lt;br /&gt;XDocument.Query();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;ERROR:&lt;br /&gt;The following error occurred:&lt;br /&gt;&lt;br /&gt;The query method on the Document object failed.&lt;br /&gt;InfoPath cannot run the specified query.&lt;br /&gt;The XML data returned from the data source does not match the XML Schema for this form. This discrepancy might be caused by the data source returning multiple rows when InfoPath expects only one.&lt;br /&gt;Element '&lt;a target="_blank" href=http://schemas.microsoft.com/office/infopath/2003/ado/dataFields}call_tickets'&gt;http://schemas.microsoft.com/office/infopath/2003/ado/dataFields}call_tickets'&lt;/a&gt; is unexpected according to content model of parent element '&lt;a target="_blank" href=http://schemas.microsoft.com/office/infopath/2003/dataFormSolution}dataFields'.&gt;http://schemas.microsoft.com/office/infopath/2003/dataFormSolution}dataFields'.&lt;/a&gt;&lt;br /&gt;Expecting: &lt;a target="_blank" href=http://schemas.microsoft.com/office/infopath/2003/ado/dataFields}Call_tickets.&gt;http://schemas.microsoft.com/office/infopath/2003/ado/dataFields}Call_tickets.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;File:script.js&lt;br /&gt;Line:30&lt;br /&gt;&lt;br /&gt;</description></item></channel></rss>