<?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>Data Connections</title><link>https://www.infopathdev.com:443/forums/44.aspx</link><description> </description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: InfoPath - Calling Stored Procedure with parameters from C#</title><link>https://www.infopathdev.com:443/forums/thread/29965.aspx</link><pubDate>Tue, 01 Jul 2008 14:28:34 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29965</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29965.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=29965</wfw:commentRss><description>&lt;p&gt;A web service is&amp;nbsp;a great way to go, and Qdabra&amp;#39;s DBXL can help you with this and much more. However, you can use a .config file in your C# project to store your authentication information, and call that in your code, so that you do not need to store your authentication information. This post has some information about using a .config file: &lt;a href="http://www.infopathdev.com/forums/p/8167/29809.aspx#29809"&gt;http://www.infopathdev.com/forums/p/8167/29809.aspx#29809&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Re: InfoPath - Calling Stored Procedure with parameters from C#</title><link>https://www.infopathdev.com:443/forums/thread/29946.aspx</link><pubDate>Tue, 01 Jul 2008 01:46:57 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29946</guid><dc:creator>zero77</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29946.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=29946</wfw:commentRss><description>&lt;p&gt;Thanks for both your replies. &lt;/p&gt;
&lt;p&gt;I think I should&amp;#39;ve been clearer.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;My problem is that I wish to create a Data Link File (so that authentication is done there). This is because I have heard that embedding the authentication within custom code raises a security issue. The following article appears to explain what i want to do. However, it does it in script and I want to do this in C#: &lt;a href="http://support.microsoft.com/kb/827007"&gt;http://support.microsoft.com/kb/827007&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;I think I might just have to use a web service as was advised?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: InfoPath - Calling Stored Procedure with parameters from C#</title><link>https://www.infopathdev.com:443/forums/thread/29939.aspx</link><pubDate>Mon, 30 Jun 2008 21:26:21 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29939</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29939.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=29939</wfw:commentRss><description>&lt;p&gt;Hello:&lt;/p&gt;
&lt;p&gt;Here is&amp;nbsp;a link to a code sample that creates a Sql connection in code: &lt;a href="http://www.sharepointblogs.com/ssa/archive/2006/01/03/populating-infopath-fields-with-sql-data-using-managed-code.aspx"&gt;http://www.sharepointblogs.com/ssa/archive/2006/01/03/populating-infopath-fields-with-sql-data-using-managed-code.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Where this code has the command &lt;strong&gt;&amp;quot;select * from tblUser&amp;quot;&lt;/strong&gt; you could easily replace with &lt;strong&gt;&amp;quot;execute sp&amp;quot;&lt;/strong&gt;&amp;nbsp; etc. If you want to get your parameter value from form field and use that value for your parameter, you can do something like this:&lt;/p&gt;
&lt;blockquote&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;
&lt;p&gt;string&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; xpath = &lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;/my:myFields/my:textField&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;;&lt;br /&gt;&lt;/font&gt;&lt;font color="#008080" size="2"&gt;&lt;font color="#008080" size="2"&gt;XPathNavigator&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; field = MainDataSource.CreateNavigator().SelectSingleNode(xpath, NamespaceManager);&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;font size="2"&gt;and then use field.Value in your sql command for your parameter value. If your form is defaulting to vb.net and you&amp;#39;d prefer C#, you can change that in Tools/Form Options under the programming tab. &lt;/p&gt;&lt;/font&gt;</description></item><item><title>Re: InfoPath - Calling Stored Procedure with parameters from C#</title><link>https://www.infopathdev.com:443/forums/thread/29921.aspx</link><pubDate>Mon, 30 Jun 2008 14:00:08 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29921</guid><dc:creator>Clay Fox</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29921.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=29921</wfw:commentRss><description>&lt;p&gt;Have you looked at using a web service instead?&lt;/p&gt;
&lt;p&gt;This is best practice rather than hardcoding each InfoPath form with code.&lt;/p&gt;
&lt;p&gt;Qdabra has some installable ones to get you going immediatly or for reference. &lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.infopathdev.com/files/folders/dbxldownload/entry29778.aspx" target="_blank"&gt;DBXL v2.2 Beta Edition&lt;/a&gt;&lt;/p&gt;</description></item><item><title>InfoPath - Calling Stored Procedure with parameters from C#</title><link>https://www.infopathdev.com:443/forums/thread/29912.aspx</link><pubDate>Mon, 30 Jun 2008 09:40:45 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29912</guid><dc:creator>zero77</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29912.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=29912</wfw:commentRss><description>&lt;p&gt;To anybody that can help,&lt;/p&gt;
&lt;p&gt;Objective: I want to pass through parameters to an SQL Server 2005 stored procedure from an InfoPath field. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Problem: How to do this within the Change Event of the field using C# or VB?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;A bit of background: &lt;/p&gt;
&lt;p&gt;I have installed Microsoft .NET Framework 3.0 and Visual Studio&lt;/p&gt;
&lt;p&gt;What this means is that whenever I try to insert code into the Change Event of the field (which contains the parameter value), it loads up Microsoft Visual Basic for applications environment. I found this article which explains this:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/bb250982.aspx"&gt;http://msdn.microsoft.com/en-us/library/bb250982.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Additionally, I have found this article that at first glance appears to do what I want:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://support.microsoft.com/kb/827007"&gt;http://support.microsoft.com/kb/827007&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The problem with this is that it uses a script within Microsoft Script Editor.&lt;/p&gt;
&lt;p&gt;Help please&lt;/p&gt;</description></item></channel></rss>