<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>SnapJag Creative Designs &#187; C#</title>
	<atom:link href="http://www.snapjag.com/tag/c/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.snapjag.com</link>
	<description>Best team of specialists in programming, hosting, photography, and creative system designs.</description>
	<lastBuildDate>Thu, 05 Aug 2010 20:00:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>C# Missing References</title>
		<link>http://www.snapjag.com/2009/07/c-missing-reference/</link>
		<comments>http://www.snapjag.com/2009/07/c-missing-reference/#comments</comments>
		<pubDate>Mon, 06 Jul 2009 23:08:18 +0000</pubDate>
		<dc:creator>snapjag</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[Assemblies]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Libraries]]></category>
		<category><![CDATA[References]]></category>

		<guid isPermaLink="false">http://www.snapjag.com/?p=635</guid>
		<description><![CDATA[If you are getting an error like &#8220;The type or namespace name does not exist in the namespace&#8221; you may have found yourself tweaking the references or the using statements in your C# code. The using statement and the referencing statement differ in that the using statement is a logical link and reference to the [...]]]></description>
			<content:encoded><![CDATA[<p>If you are getting an error like &#8220;The type or namespace name does not exist in the namespace&#8221; you may have found yourself tweaking the references or the using statements in your C# code.</p>
<p>The using statement and the referencing statement differ in that the using statement is a logical link and reference to the namespace library, this makes it so you can shorten your qualifications to objects. Instead of typeing System.Windows.Forms.Textbox. You place a using statement &#8220;using System.Windows.Forms&#8221; at the top of your page and you only have to now use the word Textbox to reference the object. These are also usually statements to libraries within your current namespace.</p>
<p>The References are registrations to libraries and dlls that are to be used outside your namespace.</p>
<p>Recently in a project, there were a number of projects that had change adding some ENUM references that were prominently used in the application. These errors made it immpossible to build the solution. In order to rid yourself of this error, you must resolve a conflict, or supply a reference or using statement.</p>
<p>First, check the statement where the error occurs. Make sure the namespace/library that the object refers to is available in the project. If you find the source cs file, look to see if the Namespace is different than where the object is being used. If they are different, then either fully qualify the namespace in front of the object, or add the &#8220;using &lt;full namespace&gt;;&#8221; statement at the top.</p>
<p>Try and compile the application, if you still have the error, then look in the current project (where the error occurs) References list and see if the assembly/library is there. It&#8217;s it isn&#8217;t, then add the new Reference by either locating the .NET object, COM object, project, or file.</p>
<p>When this has been added, try compiling again. If you still get the error, then you&#8217;ll have write some comments here and provide your code for me to be able to help you further.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.snapjag.com/2009/07/c-missing-reference/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using properties in an ASP.net Web Control</title>
		<link>http://www.snapjag.com/2009/04/using-properties-in-an-aspnet-web-control/</link>
		<comments>http://www.snapjag.com/2009/04/using-properties-in-an-aspnet-web-control/#comments</comments>
		<pubDate>Thu, 23 Apr 2009 20:28:04 +0000</pubDate>
		<dc:creator>snapjag</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Controls]]></category>
		<category><![CDATA[Web Control]]></category>

		<guid isPermaLink="false">http://www.snapjag.com/?p=465</guid>
		<description><![CDATA[When creating a web control in an ASP.net application many times you will need to make references to information, data values and other contents of the web control from the web control parent. This is done by adding a Property statement on the control. It could be as simple as a Username and Password control [...]]]></description>
			<content:encoded><![CDATA[<p>When creating a web control in an ASP.net application many times you will need to make references to information, data values and other contents of the web control from the web control parent. This is done by adding a Property statement on the control. It could be as simple as a Username and Password control to set or get the information at times of requesting login details.</p>
<p>Follow these steps to connect and use data on the User Web Control:</p>
<ol>
<li>Create a new Web Control in your application project</li>
<li>Place two label and two textboxes on the control</li>
<li>Name the two controls txtUsername and txtAddress</li>
<li>In the code behind of the control add the following code (C#)private string username = String.Empty;<br />
private string password; = String.Empty;</li>
<p>public string Username {<br />
get { return username; }<br />
set { set username = value; }<br />
}</p>
<p>public string Password{<br />
get { return password; }<br />
set { set password; = value; }<br />
}</p>
<li>Close the control designer windows, saving all changes</li>
<li>Open the web page that will use the control</li>
<li>Drag and drop the new web control onto the web page canvas (if you already had the web control on your webpage and you added new interface elements (public functions or properties), you will likely need to remove the controls including the REGISTER statements at the top of the page so that the interface elements are reconnected to the page for you.</li>
<li>In the code behind the web page, make any references to the Tag name of the control (assuming &#8220;uc1&#8243; in this case) using the following statements (C#).this.uc1.Username = &#8220;Your username&#8221;;<br />
this.uc1.Password{ = &#8220;Your password&#8221;;</li>
</ol>
<p>This concludes the tutorial to add a simple web control and connect to it from the parent web page where it resides. This concept will help in many ways like, login pages, bread crumbs, contained lists, or other user interface lists.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.snapjag.com/2009/04/using-properties-in-an-aspnet-web-control/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SMO SQL Server Error Reading Stored Procedures Collection</title>
		<link>http://www.snapjag.com/2008/11/sql_smo_sp_error/</link>
		<comments>http://www.snapjag.com/2008/11/sql_smo_sp_error/#comments</comments>
		<pubDate>Sat, 08 Nov 2008 17:53:17 +0000</pubDate>
		<dc:creator>snapjag</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://gleew.wordpress.com/?p=123</guid>
		<description><![CDATA[The following error is appearing while running Visual Studio 2005 and developing an application with SMO capabilities. It appears when trying perform a foreach( on ActiveDB.StoredProcedures). Could not load file or assembly &#8216;Microsoft.SqlServer.BatchParser, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91&#8242; or one of its dependencies. An attempt was made to load a program with an incorrect format. I found [...]]]></description>
			<content:encoded><![CDATA[<p>The following error is appearing while running Visual Studio 2005 and developing an application with SMO capabilities. It appears when trying perform a <em>foreach( on ActiveDB.StoredProcedures)</em>.</p>
<blockquote><p>Could not load file or assembly &#8216;Microsoft.SqlServer.BatchParser, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91&#8242; or one of its dependencies. An attempt was made to load a program with an incorrect format.</p></blockquote>
<p>I found an MSDN article that recommends downloading the 64 bit SMO assembly.<span id="more-266"></span></p>
<p>Here is the Microsoft MSDN article that talks about SQL Server connectivity for both 2005 and backward compatibility.</p>
<ul>
<li><a href="http://www.microsoft.com/downloads/details.aspx?familyid=D09C1D60-A13C-4479-9B91-9E8B9D835CDC&amp;displaylang=en" target="_blank">Feature Pack for Microsoft SQL Server 2005</a></li>
</ul>
<p>I had to close all applications, especially Visual Studio and then installed the following application.</p>
<ul>
<li><a href="http://download.microsoft.com/download/4/4/D/44DBDE61-B385-4FC2-A67D-48053B8F9FAD/SQLServer2005_ADOMD_x64.msi" target="_blank"></a><a href="http://download.microsoft.com/download/4/4/D/44DBDE61-B385-4FC2-A67D-48053B8F9FAD/SQLServer2005_XMO_x64.msi"><span><strong></strong></span></a><strong><a href="http://download.microsoft.com/download/4/4/D/44DBDE61-B385-4FC2-A67D-48053B8F9FAD/SQLServer2005_XMO_x64.msi">X64 Package</a></strong> (SQLServer2005_XMO_x64.msi) &#8211; 14675 KB</li>
</ul>
<p>My system info is:</p>
<ul>
<li>OS Name &#8211; Microsoft® Windows Vista™ Home Premium</li>
<li>Version &#8211; 6.0.6001 Service Pack 1 Build 6001</li>
<li>System Type &#8211; x64-based PC</li>
<li>Processor &#8211; AMD Turion(tm) X2 Dual-Core Mobile RM-70, 2000 Mhz, 2 Core(s), 2 Logical Processor(s)</li>
</ul>
<p>The installation took care of updating and using the latest SMO objects in the project. No removing of Assemblies or references was needed. Worked like a charm.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.snapjag.com/2008/11/sql_smo_sp_error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle Maximum Open Cursors Exceeded</title>
		<link>http://www.snapjag.com/2008/05/oracle-maximum-open-cursors-exceeded/</link>
		<comments>http://www.snapjag.com/2008/05/oracle-maximum-open-cursors-exceeded/#comments</comments>
		<pubDate>Wed, 21 May 2008 20:33:14 +0000</pubDate>
		<dc:creator>snapjag</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://gleew.wordpress.com/?p=27</guid>
		<description><![CDATA[In writing my application that checks certain settings and values every few seconds received the following error today. ORA-01000: maximum open cursors This error presented itself because I wasn&#8217;t closing the OracleDataReader object in my code. I&#8217;ll show below the entire code and then bold the code that I had to add to rid my [...]]]></description>
			<content:encoded><![CDATA[<p>In writing my application that checks certain settings and values every few seconds received the following error today.</p>
<blockquote><p>ORA-01000: maximum open cursors</p></blockquote>
<p>This error presented itself because I wasn&#8217;t closing the OracleDataReader object in my code. I&#8217;ll show below the entire code and then bold the code that I had to add to rid my code of the leak. I used <em>TOAD for Oracle</em> to find the <em>opened cursors current</em> in the Statistics of the Session Browser on the database.<span id="more-252"></span></p>
<p>I am using Oracle 10g and the C# code is as follows:</p>
<blockquote><p>public int OracleActiveConnections<br />
{<br />
get // SELECT * FROM V$SESSION WHERE PROGRAM IS NOT NULL<br />
{<br />
OracleConnection oraConn = new OracleConnection(&#8220;Data Source=main_new_prod;User ID=system;Password=manager;&#8221;);<br />
oraConn.Open();<br />
OracleCommand oraCmd = oraConn.CreateCommand();<br />
oraCmd.CommandText = &#8220;select count(server) as Value, server from v$session group by server&#8221;;<br />
oraCmd.CommandType = System.Data.CommandType.Text;<br />
oraCmd.CommandTimeout = 15;<br />
OracleDataReader oResult = oraCmd.ExecuteReader();<br />
oResult.Read();<br />
int iValue = Convert.ToInt32(oResult["Value"].ToString());<br />
<strong> oResult.Close();<br />
oResult.Dispose();</strong><br />
oraCmd.Dispose();<br />
oraConn.Close();<br />
oraConn.Dispose();</p>
<p>return iValue;<br />
}<br />
}</p></blockquote>
<p>Adding the code in bold above closed the object cursors without having to tinker with the <em>max-pooled</em> settings on the datasource or the <em>cursors</em> setting on the database. Although this is something may need to be changed. Test, test test.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.snapjag.com/2008/05/oracle-maximum-open-cursors-exceeded/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ORA-00911 invalid character</title>
		<link>http://www.snapjag.com/2008/04/ora-00911-invalid-character/</link>
		<comments>http://www.snapjag.com/2008/04/ora-00911-invalid-character/#comments</comments>
		<pubDate>Mon, 07 Apr 2008 21:26:37 +0000</pubDate>
		<dc:creator>snapjag</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://gleew.wordpress.com/?p=20</guid>
		<description><![CDATA[I am using .NET 2005 and the Oracle 10g 10.2 Oracle .NET data framework and I received this error while trying to run a simple statement that is used to find out how many dedicated processes are being used in my Oracle database (&#8220;select count(server) as Value, Server from v$session group by server&#8221;). Something similar [...]]]></description>
			<content:encoded><![CDATA[<p>I am using .NET 2005 and the Oracle 10g 10.2 Oracle .NET data framework and I received this error while trying to run a simple statement that is used to find out how many dedicated processes are being used in my Oracle database (&#8220;select count(server) as Value, Server from v$session group by server&#8221;). Something similar to ActiveConnections in the SQL .NET SMO environment. This happened with both Oracle .Net Data Framework Assembly and the Microsoft SQL OLEDB Assembly.<span id="more-246"></span></p>
<p>I figured I would write it like I normal in SQLPlus using the &#8220;;&#8221; (semicolon) similar to any other statement. But No! It doesn&#8217;t like it. I&#8217;m sure there are other &#8220;invalid characters&#8221;, but I haven&#8217;t taken the time to find out what all of them. You you know of any and want to list them here I would be greatful.</p>
<p>I figured this might be enough to start the thread and because others would most likely think a common character like that wouldn&#8217;t be &#8220;invalid&#8221;, hmmm, but &#8230; it is! Hope it helps.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.snapjag.com/2008/04/ora-00911-invalid-character/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
