<?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: Failed to Connect SQLClient</title><link>https://www.infopathdev.com:443/forums/thread/106015.aspx</link><pubDate>Sun, 03 Apr 2016 10:35:49 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:106015</guid><dc:creator>htalebi</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/106015.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=106015</wfw:commentRss><description>If you are still searching for a solution 3 years later, here is it :)

in infopath designer goto: File -&amp;gt; Form options -&amp;gt; Security and Trust -&amp;gt; then uncheck &amp;#39;Automatically determine security level&amp;#39;
and check &amp;#39;Full trust&amp;#39;


voila!</description></item><item><title>Re: Failed to Connect SQLClient</title><link>https://www.infopathdev.com:443/forums/thread/73635.aspx</link><pubDate>Mon, 09 Jan 2012 05:18:07 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:73635</guid><dc:creator>rajkumar.bathula</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/73635.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=73635</wfw:commentRss><description>&lt;p&gt;Hi Hilary,&lt;/p&gt;
&lt;p&gt;could you please explain more about your suggested&amp;nbsp;fix? You mean to say, we can use Data Connection that we created through UI in code?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Below is my exception message that i am receiving when opening connection through C# code on Form load event:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;[System.Security.SecurityException] = {&amp;quot;Request for the permission of type &amp;#39;System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&amp;#39; failed.&amp;quot;}&lt;/strong&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Below is my connection string and code block&amp;nbsp;i am using in my code:&lt;/p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;using&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; (&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;SqlConnection&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; conn = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;new&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;SqlConnection&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;Data Source=systemname\\dbname;Initial Catalog=SharePoint_DB;User ID=admin;Password=Pass01*;Integrated Security=true;&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;))&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;conn.Open();&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;conn.Close();&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;}&lt;/p&gt;&lt;/font&gt;
&lt;p&gt;&amp;nbsp;I need this issue to be fixed very deadly, please kindly help me.&lt;/p&gt;
&lt;p&gt;thanks&lt;/p&gt;
&lt;p&gt;raj&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Failed to Connect SQLClient</title><link>https://www.infopathdev.com:443/forums/thread/68514.aspx</link><pubDate>Mon, 18 Jul 2011 21:02:04 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:68514</guid><dc:creator>kulkarni</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/68514.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=68514</wfw:commentRss><description>&lt;p&gt;I have the same problem if any one found the solution please let u sknow&lt;/p&gt;</description></item><item><title>Re: Failed to Connect SQLClient</title><link>https://www.infopathdev.com:443/forums/thread/62750.aspx</link><pubDate>Tue, 04 Jan 2011 15:48:19 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:62750</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/62750.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=62750</wfw:commentRss><description>Hi there -- this code will require your form be full trust. You may want to revise your code and create a data connection in InfoPath first, then modify the SQL for that data connection. Then your form can be domain trust.</description></item><item><title>Failed to Connect SQLClient</title><link>https://www.infopathdev.com:443/forums/thread/62421.aspx</link><pubDate>Mon, 20 Dec 2010 07:50:58 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:62421</guid><dc:creator>MinkZzZzZzz</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/62421.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=62421</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;I&amp;#39;m using InfoPath 2010 and write code vs. I try to retrieve the records from SQL server 
and update the form&amp;#39;s field but system prompt the following error when 
execute the code &amp;quot;objConn.Open()&amp;quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;img src="http://upic.me/i/r7/8n7pp.png" width="994" height="456" alt="" /&gt;&lt;img alt="" /&gt;&lt;/p&gt;&lt;p&gt;Request for the permission of type &amp;#39;System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&amp;#39; failed. &lt;/p&gt;&lt;p&gt;System.Security.SecurityException was unhandled by user code&lt;br /&gt;&amp;nbsp; Message=&amp;quot;Request for the permission of type &amp;#39;System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&amp;#39; failed.&amp;quot;&lt;br /&gt;&amp;nbsp; Source=&amp;quot;mscorlib&amp;quot;&lt;br /&gt;&amp;nbsp; StackTrace:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark&amp;amp; stackMark, Boolean isPermSet)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Security.PermissionSet.Demand()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Data.Common.DbConnectionOptions.DemandPermission()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Data.SqlClient.SqlConnection.Open()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at Absence_Request_Form.DBConnect.QueryDataSet(String strSQL)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at Absence_Request_Form.FormCode.abFromDate_Changed(Object sender, XmlEventArgs e)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at Microsoft.Office.InfoPath.Internal.XmlEventHost.GenericProxy(Object genericDelegate, DataDOMEvent dataDOMEvent, InfoPathEvents type)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at Microsoft.Office.Interop.InfoPath.SemiTrust._DataDOMEventSink_SinkHelper.OnAfterChange(DataDOMEvent pDataDOMEvent)&lt;br /&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Please advice and suggest the solution.&lt;br /&gt;&lt;br /&gt;Thank you.&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Mink ^^&lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>