<?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: Using stored procedure in code</title><link>https://www.infopathdev.com:443/forums/thread/39171.aspx</link><pubDate>Wed, 04 Mar 2009 15:22:38 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:39171</guid><dc:creator>belote82</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/39171.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=39171</wfw:commentRss><description>&lt;p&gt;It works&lt;/p&gt;
&lt;p&gt;&amp;nbsp;thank you so much!!&lt;/p&gt;</description></item><item><title>Re: Using stored procedure in code</title><link>https://www.infopathdev.com:443/forums/thread/39167.aspx</link><pubDate>Wed, 04 Mar 2009 14:40:11 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:39167</guid><dc:creator>Evan513</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/39167.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=39167</wfw:commentRss><description>&lt;p&gt;Xavier,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I have had to use a stored proceedure recently and found Hilary Stoupa&amp;#39;s post on &amp;quot;Fun with Sequential Form IDs, SQL and Sprocs!&amp;quot; a real hair saver.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.infopathdev.com/blogs/hilary/archive/2008/11/21/fun-with-sequential-form-ids-sql-and-sprocs.aspx"&gt;http://www.infopathdev.com/blogs/hilary/archive/2008/11/21/fun-with-sequential-form-ids-sql-and-sprocs.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If you look at all the steps involved it should help you out.&lt;/p&gt;
&lt;p&gt;I was particularly helped by the addendum at the bottom, be sure to read the whole blog post.&lt;/p&gt;
&lt;p&gt;(Thank you Hilary!)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Evan&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: Using stored procedure in code</title><link>https://www.infopathdev.com:443/forums/thread/39163.aspx</link><pubDate>Wed, 04 Mar 2009 14:04:37 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:39163</guid><dc:creator>belote82</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/39163.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=39163</wfw:commentRss><description>&lt;p&gt;I&amp;#39;ve the problem again, I have to use an insert stored procedure&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Any idea how to do this??&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please, help :)&lt;/p&gt;</description></item><item><title>Re: Using stored procedure in code</title><link>https://www.infopathdev.com:443/forums/thread/33340.aspx</link><pubDate>Wed, 22 Oct 2008 07:29:30 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:33340</guid><dc:creator>belote82</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/33340.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=33340</wfw:commentRss><description>&lt;p&gt;I&amp;#39;ve not said that I&amp;#39;m using vbscript or Jscript, but no .NET code...&lt;/p&gt;
&lt;p&gt;&amp;nbsp;But thanks for your reply&lt;/p&gt;</description></item><item><title>Re: Using stored procedure in code</title><link>https://www.infopathdev.com:443/forums/thread/33330.aspx</link><pubDate>Wed, 22 Oct 2008 06:03:17 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:33330</guid><dc:creator>swathip</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/33330.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=33330</wfw:commentRss><description>&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Verdana&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;"&gt;Once use the following code.&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Verdana&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Verdana&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;"&gt;Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click &lt;/span&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Verdana&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;"&gt;Dim cmd As New SqlCommand(&amp;quot;spInsertData&amp;quot;, New SqlConnection(ConfigurationManager.AppSettings(&amp;quot;ConnString&amp;quot;)))&lt;br /&gt;cmd.CommandType = CommandType.StoredProcedure&lt;br /&gt;&lt;br /&gt;cmd.Parameters.AddWithValue(&amp;quot;@name&amp;quot;, txtName.Text)&lt;br /&gt;cmd.Parameters.AddWithValue(&amp;quot;@city&amp;quot;, txtCity.Text)&lt;br /&gt;&lt;br /&gt;cmd.Connection.Open()&lt;br /&gt;cmd.ExecuteNonQuery()&lt;br /&gt;cmd.Connection.Close()&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;LINE-HEIGHT:115%;FONT-FAMILY:&amp;#39;Verdana&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;LINE-HEIGHT:115%;FONT-FAMILY:&amp;#39;Verdana&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;LINE-HEIGHT:115%;FONT-FAMILY:&amp;#39;Verdana&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;The Stored Procedure will look something like this:&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Verdana&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;"&gt;ALTER PROCEDURE spInsertData &lt;/span&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Verdana&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;"&gt;@name varchar(50),&lt;br /&gt;@city varchar (50)&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Verdana&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;"&gt;AS &lt;/span&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Verdana&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;"&gt;INSERT INTO [tblOne]&lt;br /&gt;(theName, theCity)&lt;br /&gt;VALUES (@name, @city)&lt;br /&gt;RETURN&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;LINE-HEIGHT:115%;FONT-FAMILY:&amp;#39;Verdana&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;&amp;nbsp;&lt;/span&gt; 
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Using stored procedure in code</title><link>https://www.infopathdev.com:443/forums/thread/33297.aspx</link><pubDate>Tue, 21 Oct 2008 14:00:30 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:33297</guid><dc:creator>belote82</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/33297.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=33297</wfw:commentRss><description>&lt;p&gt;I&amp;#39;ve all the permissions and my form is in full trust...&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I really don&amp;#39;t understand the problem.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve also tried to make a dataconnection with a &amp;quot;Select ...&amp;quot; , change the command of the queryadapter in the code to &amp;quot;execute ...&amp;quot; and use the myAdapter.Query().&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve no error, but no row have been added to my table...&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I&amp;#39;m desperate...&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Using stored procedure in code</title><link>https://www.infopathdev.com:443/forums/thread/33296.aspx</link><pubDate>Tue, 21 Oct 2008 13:43:16 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:33296</guid><dc:creator>swathip</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/33296.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=33296</wfw:commentRss><description>&lt;span style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:&amp;#39;Verdana&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-bidi-font-family:Arial;"&gt;Hi,&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:&amp;#39;Verdana&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-bidi-font-family:Arial;"&gt;Make sure that you have permissions to access the data base. And also make sure that the form should be a full trust form. To make&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;a form full trust, follow the below steps.&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:&amp;#39;Verdana&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-bidi-font-family:Verdana;mso-fareast-font-family:Verdana;"&gt;&lt;span style="mso-list:Ignore;"&gt;1.&lt;span style="FONT:7pt &amp;#39;Times New Roman&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:&amp;#39;Verdana&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-bidi-font-family:Arial;"&gt;Go to tools-&amp;gt;form options&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Verdana&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:&amp;#39;Verdana&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-bidi-font-family:Verdana;mso-fareast-font-family:Verdana;"&gt;&lt;span style="mso-list:Ignore;"&gt;2.&lt;span style="FONT:7pt &amp;#39;Times New Roman&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:&amp;#39;Verdana&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-bidi-font-family:Arial;"&gt;In the security and trust tab, uncheck ‘Automatically determine security..’ and select ‘Full Trust(..)’ radio button. Click ok.&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Verdana&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;&lt;/span&gt; 
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Using stored procedure in code</title><link>https://www.infopathdev.com:443/forums/thread/33293.aspx</link><pubDate>Tue, 21 Oct 2008 08:08:11 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:33293</guid><dc:creator>belote82</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/33293.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=33293</wfw:commentRss><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I have to add some data in a sql table when the user press a button.&lt;/p&gt;
&lt;p&gt;I think I have to do this programmatically.&lt;/p&gt;
&lt;p&gt;So I&amp;#39;ve tried to use ADO connection, but it doesn&amp;#39;t work...&lt;/p&gt;
&lt;p&gt;&amp;nbsp;That&amp;#39;s what I&amp;#39;ve done : &lt;/p&gt;
&lt;p&gt;Dim mConnection Set mConnection = CreateObject(&amp;quot;ADODB.Connection&amp;quot;) &lt;/p&gt;
&lt;p&gt;mConnection.Open &amp;quot;Provider=SQLOLEDB.1;Data Source=SRVTRAD1\INSD01;Initial Catalog=EL1EEDPCentre;Integrated security=SSPI&amp;quot; mConnection.Open &amp;quot;server=SRVTRAD1\INSD01;database=EL1EEDPCentre;Integrated Security=SSPI;&amp;quot; &lt;/p&gt;
&lt;p&gt;result = mConnection.Execute(&amp;quot;EXECUTE IC.prc_LapWeb_Insert @bookEmpID = &amp;quot; &amp;amp; fldMatricule &amp;amp; &amp;quot;, @bookEmail = &amp;quot; &amp;amp; fldEmail &amp;amp; &amp;quot;, @bookBegin = &amp;quot; &amp;amp; fldBegindate &amp;amp; &amp;quot;, @bookEnd = &amp;quot; &amp;amp; fldEnddate &amp;amp; &amp;quot;, @bookType = &amp;quot; &amp;amp; fldHardwaretype &amp;amp; &amp;quot;, @Comment = &amp;quot; &amp;amp; fldComment &amp;amp; &amp;quot;, @Status = 1&amp;quot;)&lt;/p&gt;
&lt;p&gt;At the MConnection.Open, Ive this message : safety settings on this computer prohibit accessing a data source on another domain &lt;/p&gt;
&lt;p&gt;&amp;nbsp;Where am I wrong? Is there another way to do this?&lt;/p&gt;
&lt;p&gt;Thank you very much&lt;/p&gt;
&lt;p&gt;kr&lt;/p&gt;
&lt;p&gt;Xavier&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>