<?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: Infopath 2003 Stored Procedures in Visual Basic .NET</title><link>https://www.infopathdev.com:443/forums/thread/61296.aspx</link><pubDate>Thu, 11 Nov 2010 03:50:30 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:61296</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/61296.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=61296</wfw:commentRss><description>&lt;p&gt;Most likely, any SQL statements that make changes to your data are going to be affected by the issue I referenced here:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;span style="FONT-FAMILY:&amp;#39;Verdana&amp;#39;,&amp;#39;sans-serif&amp;#39;;FONT-SIZE:12pt;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-ansi-language:EN-US;mso-fareast-language:ZH-CN;mso-bidi-language:AR-SA;"&gt;&lt;a href="http://www.infopathdev.com/forums/p/17552/61246.aspx#61246"&gt;&lt;strong&gt;&lt;font color="#0000ff"&gt;Re: Inserting multi selection to database via DBXL&lt;/font&gt;&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;span style="FONT-FAMILY:&amp;#39;Verdana&amp;#39;,&amp;#39;sans-serif&amp;#39;;FONT-SIZE:12pt;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-ansi-language:EN-US;mso-fareast-language:ZH-CN;mso-bidi-language:AR-SA;"&gt;&lt;font size="2" face="Arial"&gt;and I think the workaround there will work for just about any situation you would want.&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Re: Infopath 2003 Stored Procedures in Visual Basic .NET</title><link>https://www.infopathdev.com:443/forums/thread/61291.aspx</link><pubDate>Thu, 11 Nov 2010 01:07:39 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:61291</guid><dc:creator>ZhenYuan</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/61291.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=61291</wfw:commentRss><description>&lt;p&gt;Hi Hilary,&lt;/p&gt;
&lt;p&gt;Just read Jimmy&amp;#39;s reply and yes formdb..group is my table name. &lt;/p&gt;
&lt;p&gt;I guess I&amp;#39;ll use a table trigger to do my updates, but nonetheless, I&amp;#39;m keen to find out what statements can I replace my command with? Insert statements? If I didn&amp;#39;t remember wrongly, I did try to run a stored proc before but similarly, it did not execute. Could it be because my SP has an update statement? &lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;</description></item><item><title>Re: Infopath 2003 Stored Procedures in Visual Basic .NET</title><link>https://www.infopathdev.com:443/forums/thread/61290.aspx</link><pubDate>Thu, 11 Nov 2010 00:54:52 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:61290</guid><dc:creator>ZhenYuan</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/61290.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=61290</wfw:commentRss><description>&lt;p&gt;This is my full button code:&lt;/p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;
&lt;p&gt;Dim&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; myAdoQueryConnection &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; AdoQueryConnection = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;Me&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.DataConnections(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;ETS_Group_Engagement&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;)&lt;/font&gt; 
&lt;p&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;myAdoQueryConnection.Command = &lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;update formdb..Group set IDCode = &amp;#39;1111&amp;#39; where IDCode = &amp;#39;3435-235&amp;#39; &amp;quot;&lt;/font&gt;&lt;/font&gt; 
&lt;p&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;myAdoQueryConnection.Execute()&lt;/font&gt;&lt;font size="2"&gt;I&amp;#39;m not sure why the double quotes came in&amp;nbsp;my post&amp;nbsp;but my code is using single codes so should be ok. If I run the command in sql, it updates fine.&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;&lt;/font&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Infopath 2003 Stored Procedures in Visual Basic .NET</title><link>https://www.infopathdev.com:443/forums/thread/61275.aspx</link><pubDate>Wed, 10 Nov 2010 20:00:19 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:61275</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/61275.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=61275</wfw:commentRss><description>&lt;p&gt;You&amp;#39;ve not put all your code in the thread. But given what you have posted, I&amp;#39;d assume that the SQL query would fail:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;myAdoQueryConnection.Command = &lt;/p&gt;

&lt;p&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;update formdb..Group set&amp;nbsp;IDCode = &amp;#39;1111&amp;#39; where IDCode = &amp;quot;3435-235&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The IDCode seems to have double quotes around it, which I&amp;#39;d expect SQL not to like.&lt;/p&gt;
&lt;p&gt;What happens if you run that update statement in SQL Server Management Studio? Is &amp;quot;formdb..Group&amp;quot; your table name?&lt;/p&gt;
&lt;p&gt;EDIT:&lt;/p&gt;
&lt;p&gt;I see that Jimmy Rishe has &lt;a href="http://www.infopathdev.com/forums/p/17552/61246.aspx#61246"&gt;answered&lt;/a&gt; this -- it has to do with the way IP is handling the Update command.&lt;/p&gt;</description></item><item><title>Re: Infopath 2003 Stored Procedures in Visual Basic .NET</title><link>https://www.infopathdev.com:443/forums/thread/61238.aspx</link><pubDate>Wed, 10 Nov 2010 03:14:53 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:61238</guid><dc:creator>ZhenYuan</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/61238.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=61238</wfw:commentRss><description>&lt;p&gt;There were no errors on execute. But the table column values were not updated. Is my ADOQueryconnection coding correct?&lt;/p&gt;</description></item><item><title>Re: Infopath 2003 Stored Procedures in Visual Basic .NET</title><link>https://www.infopathdev.com:443/forums/thread/61222.aspx</link><pubDate>Tue, 09 Nov 2010 19:42:16 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:61222</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/61222.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=61222</wfw:commentRss><description>&lt;p&gt;Are there any errors when you execute? I&amp;#39;m guessing that the reason you you are setting a field value is simply to verify your code is running? Did you run in debug so you can see what is going on? &lt;/p&gt;</description></item><item><title>Re: Infopath 2003 Stored Procedures in Visual Basic .NET</title><link>https://www.infopathdev.com:443/forums/thread/61145.aspx</link><pubDate>Mon, 08 Nov 2010 02:14:04 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:61145</guid><dc:creator>ZhenYuan</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/61145.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=61145</wfw:commentRss><description>&lt;p&gt;Hi again,&lt;/p&gt;
&lt;p&gt;Just tested and somehow we are able to connect to the database table which we configured the DB data connection (we gave rights to the DBXL service account to our database directly. Using web service calls, this was not required). However, we are not able to execute any Adoconnection.command. Our code is below:&lt;/p&gt;&lt;font size="2"&gt;
&lt;p&gt;myAdoQueryConnection.Command = &lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;update formdb..Group set&amp;nbsp;IDCode = &amp;#39;1111&amp;#39; where IDCode = &amp;quot;3435-235&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;font color="#800000"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;
&lt;p&gt;Me&lt;/font&gt;&lt;/font&gt;&lt;font color="#000000" size="2"&gt;.CreateNavigator().SelectSingleNode(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;/my:myFields/my:DeleteGroup/my:test&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font color="#000000" size="2"&gt;, &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;Me&lt;/font&gt;&lt;/font&gt;&lt;font color="#000000" size="2"&gt;.NamespaceManager).SetValue(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;test&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;myAdoQueryConnection.Execute()&lt;/p&gt;
&lt;p&gt;We put in the &amp;quot;Test&amp;quot; field and were able to populate that field with &amp;quot;test&amp;quot; but the myAdoQueryConnection.Execute() did not seem to execute our update statement. Did we do it wrongly?&amp;nbsp;&lt;/p&gt;&lt;/font&gt;</description></item><item><title>Re: Infopath 2003 Stored Procedures in Visual Basic .NET</title><link>https://www.infopathdev.com:443/forums/thread/61133.aspx</link><pubDate>Sun, 07 Nov 2010 06:45:30 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:61133</guid><dc:creator>ZhenYuan</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/61133.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=61133</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hi Hilary,&lt;/p&gt;&lt;p&gt;Thanks for your reply! Opening up our DB with read access to all users might not be such a good idea, in any case, I&amp;#39;ll give it a try with an account which has read access.&lt;/p&gt;&lt;p&gt;Will we be able to use code to run stored procedures if we use a web service connection to our database? Because we are able to use web service to pull data from our DB. Was wondering if its because the web service uses an DB Admin service account while if we use a DB connection, its using another account, probably the user account, to try to draw data and thus causing the failure. &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Infopath 2003 Stored Procedures in Visual Basic .NET</title><link>https://www.infopathdev.com:443/forums/thread/61117.aspx</link><pubDate>Fri, 05 Nov 2010 15:43:35 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:61117</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/61117.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=61117</wfw:commentRss><description>&lt;p&gt;Hi:&lt;/p&gt;&lt;p&gt;Yes, I&amp;#39;m saying to create a database connection and then use code to modify the command the connection uses -- this prevents having to make your form full trust, because you are using an IP data connection. In general, I agree with you that it would be best practice to use Windows Authentication when you create the data connection. I&amp;#39;m using IP 2010, and it has that as an option when you create the connection. But this does mean you have to give your form users read access to the DB.&lt;/p&gt;&lt;p&gt;As to your question with DBXL -- I&amp;#39;ve not published a form with a DB connection to DAT before, so I gave it a try. My form opened from DAT with data. I&amp;#39;ll email our support alias and see if there is anyone who has an idea why this isn&amp;#39;t working for you.&lt;/p&gt;</description></item><item><title>Re: Infopath 2003 Stored Procedures in Visual Basic .NET</title><link>https://www.infopathdev.com:443/forums/thread/61068.aspx</link><pubDate>Thu, 04 Nov 2010 09:14:18 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:61068</guid><dc:creator>ZhenYuan</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/61068.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=61068</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m am also having a weird output here when I use my database data connection. On preview mode, I can draw data from my database data connection based on the table it is tagged to. &lt;/p&gt;
&lt;p&gt;However once I launch my form from server (go to DBXL and use the link to open form), I can no longer draw any data from my database DC. It seems I cannot even access the database. I am using Windows Authentication as my log in method for this DC. &lt;/p&gt;
&lt;p&gt;Any clues on this mystery? Thanks!&lt;/p&gt;</description></item><item><title>Re: Infopath 2003 Stored Procedures in Visual Basic .NET</title><link>https://www.infopathdev.com:443/forums/thread/61067.aspx</link><pubDate>Thu, 04 Nov 2010 08:30:54 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:61067</guid><dc:creator>ZhenYuan</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/61067.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=61067</wfw:commentRss><description>&lt;p&gt;Hi Hilary,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I have the same&amp;nbsp;question here. When we need to have a data connection for this case, what you are saying is we can just create a Database data connection, select a database and its table and while this makes the data connection limited to the table, we can use code to run select statements to another table? I&amp;#39;m also have the intention to run a store procedure to logically insert/update values to several tables so the ability to run a &amp;quot;exec SP_Test&amp;quot; will be great!&lt;/p&gt;
&lt;p&gt;Last question, when we do the data connection to database using data connection wizard, we are prompted to input the Log on credentials. Can we use Windows Authentication? My concern is that when we roll out the forms to users, their credentials do not have access to the SQL tables. If this is the case, I should use a system username and password right?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;</description></item><item><title>Re: Infopath 2003 Stored Procedures in Visual Basic .NET</title><link>https://www.infopathdev.com:443/forums/thread/51453.aspx</link><pubDate>Fri, 05 Feb 2010 16:16:19 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:51453</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/51453.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=51453</wfw:commentRss><description>&lt;p&gt;Oh, and I should have been more clear -- when you create a connection to SQL, you can actually edit the SQL to something like &amp;quot;exec dbo.mystoredprocedure etc&amp;quot; and then change the command in code to pass in your parameters from your form. But creating a data source this way prevents you from having to make your form full trust.&lt;/p&gt;</description></item><item><title>Re: Infopath 2003 Stored Procedures in Visual Basic .NET</title><link>https://www.infopathdev.com:443/forums/thread/51452.aspx</link><pubDate>Fri, 05 Feb 2010 16:14:40 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:51452</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/51452.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=51452</wfw:commentRss><description>&lt;p&gt;You create a data source in InfoPath by adding a secondary data connection to your form. You can find links to help with activity &lt;a href="http://office.microsoft.com/en-us/infopath/CH100598301033.aspx"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;/a&gt;</description></item><item><title>Re: Infopath 2003 Stored Procedures in Visual Basic .NET</title><link>https://www.infopathdev.com:443/forums/thread/51397.aspx</link><pubDate>Thu, 04 Feb 2010 01:39:03 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:51397</guid><dc:creator>blaher</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/51397.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=51397</wfw:commentRss><description>&lt;p&gt;Thanks Hilary,&lt;/p&gt;&lt;p&gt;For the &amp;quot;Name of the Data Source&amp;quot;, doesn&amp;#39;t that have to be a predefined Data connection in Infopath?&amp;nbsp; What I find is that these data connections all require a table to be added.&amp;nbsp; However for my form, I only want to execute a store procedure that already queries a table.&lt;/p&gt;&lt;p&gt;I tried using the conventional VB programming where:&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim conn As New ADODB.Connection&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim cmd As New ADODB.Command &lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; conn.ConnectionString = &amp;quot;driver={SQL Server};server=****;uid=****;pwd=****;database=database&amp;quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; conn.Open()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cmd.ActiveConnection = conn &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim startDateXMLNode As IXMLDOMNode = thisXDocument.DOM.selectSingleNode(&amp;quot;//my:txt_StartDate&amp;quot;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim startDateString As String = startDateXMLNode.text.Replace(&amp;quot;-&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim querySQL As String = &amp;quot;EXEC database.dbo.Export &amp;quot; + startDateString &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim ResultSet As New ADODB.Recordset&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cmd.CommandText = querySQL&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cmd.Execute() &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;However using this method I get an error saying:&lt;/p&gt;&lt;p&gt;System.Security.SecurityException&lt;br /&gt;That assembly does not allow partially trusted callers.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp; at Timberline_Timesheet_Export.Timberline_Timesheet_Export.btn_Export_OnClick(DocActionEvent e)&lt;br /&gt;&amp;nbsp;&amp;nbsp; at Microsoft.Office.Interop.InfoPath.SemiTrust._ButtonEventSink_SinkHelper.OnClick(DocActionEvent pEvent)&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;A little confused with that, so I moved away and used your code.&amp;nbsp; Except it needs a data source which I&amp;#39;m not sure how to create. &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Infopath 2003 Stored Procedures in Visual Basic .NET</title><link>https://www.infopathdev.com:443/forums/thread/51391.aspx</link><pubDate>Wed, 03 Feb 2010 23:51:09 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:51391</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/51391.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=51391</wfw:commentRss><description>&lt;p&gt;I think more along these lines, for VB...&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;Dim&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; myDataObject &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; ADOAdapterObject = thisXDocument.DataObjects(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;Name of Data Source&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;)&lt;br /&gt;myDataObject.Command = querySQL&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt;</description></item></channel></rss>