<?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>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Sql accessing by code-sqlclientpermission error</title><link>https://www.infopathdev.com:443/forums/thread/14161.aspx</link><pubDate>Tue, 03 Jan 2006 16:02:24 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14161</guid><dc:creator>mar</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14161.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14161</wfw:commentRss><description>Hello and thanks for answer. I do not want to do it this way, because i want a button, which will send a string from a field as a part of sql query 'select field.text from ....', and i do not want to save my sql login and password in text file.When this is done by code, login and passwd are store in dll, so this is some kind of security. I'm working now on signin form by certificate.</description></item><item><title>Re: Sql accessing by code-sqlclientpermission error</title><link>https://www.infopathdev.com:443/forums/thread/14160.aspx</link><pubDate>Tue, 03 Jan 2006 15:10:52 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14160</guid><dc:creator>shailaja</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14160.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14160</wfw:commentRss><description>Hello,&lt;br /&gt;   InfoPath has default functionality that allows you to retrieve data from the DB without having to write code. If you write code to retrieve data then you will have to give full trust to the form.&lt;br /&gt;&lt;br /&gt;How to retrieve data from the DB directly via InfoPath&lt;br /&gt;1. Click on Tools -&amp;gt; Data connections&lt;br /&gt;2. Click on Add and select Receive in the radio button options and click on Next&lt;br /&gt;3. Select Database and click on Next&lt;br /&gt;4. Click on Select Database and create a data connection to the database. This is place where you edit the SQL query specifically if you so wish by clicking on Edit SQL.&lt;br /&gt;5. Click on Next and then Click on Finish&lt;br /&gt;&lt;br /&gt;From now on whenever the form is opened it will retrieve the latest information from the database.&lt;br /&gt;&lt;br /&gt;Hope this Helps!&lt;br /&gt;&lt;br /&gt;Shailaja&lt;br /&gt;InfoPath Dev India</description></item><item><title>Re: Sql accessing by code-sqlclientpermission error</title><link>https://www.infopathdev.com:443/forums/thread/14159.aspx</link><pubDate>Tue, 03 Jan 2006 08:59:17 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14159</guid><dc:creator>mar</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14159.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14159</wfw:commentRss><description>But when im using a webservice in code ive got webpermission error, and infopath can't send AND receive data from webservice datasource?Im not using form builded from data source, and in my project i can only set 'send data connection' and 'receive data connection' but not 'send and receive'(in one). When i send data to webservice it produces data form but...how to get this data?</description></item><item><title>Re: Sql accessing by code-sqlclientpermission error</title><link>https://www.infopathdev.com:443/forums/thread/14158.aspx</link><pubDate>Tue, 03 Jan 2006 01:52:20 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14158</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14158.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14158</wfw:commentRss><description>Best way to avoid it is to use a Web service. We have written forms that integrate with SQL directly and do not require Full Trust. I will ask Agni to respond since I know he has experience in this area.&lt;br /&gt;&lt;br /&gt;Patrick Halstead [InfoPath MVP]&lt;br /&gt;InfoPathDev</description></item><item><title>Sql accessing by code-sqlclientpermission error</title><link>https://www.infopathdev.com:443/forums/thread/12728.aspx</link><pubDate>Sun, 01 Jan 2006 21:53:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12728</guid><dc:creator>mar</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12728.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=12728</wfw:commentRss><description>Hello, i wrote a simply code(opening connection,select statement,get data) which gets from sql base some data(and im publishing this data to listbox by a repeating table). On my computer, when im building and testing project form visual studio2003, everything is ok, my code works.But, when i publish my form to sharepoint library and try to run, i've got an error:&lt;br /&gt;System.Data.SqlClient.SqlClientPermission, System.Data, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&lt;br /&gt;[...]&lt;br /&gt;at System.Security.CodeAccessSecurityEngine.CheckTokenBasedSetHelper(Boolean ignoreGrants, TokenBasedSet grants, TokenBasedSet denied, TokenBasedSet demands)&lt;br /&gt;   at System.Security.CodeAccessSecurityEngine.CheckSetHelper(PermissionSet grants, PermissionSet denied, PermissionSet demands)&lt;br /&gt;[...]&lt;br /&gt;&lt;br /&gt;Is anyway to avoid this?How?I was trying [SqlClientPermissionAttribute(SecurityAction.Assert, Unrestricted=true)] before my method, but this doesnt work...help...</description></item></channel></rss>