<?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>OmanDev &#187; Development</title>
	<atom:link href="http://www.omandev.net/category/english/development/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.omandev.net</link>
	<description>Technical, computer related articles and projects.</description>
	<lastBuildDate>Sat, 17 Jul 2010 18:54:16 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>O&#8217;Reilly, Developing Android Applications</title>
		<link>http://www.omandev.net/2010/02/oreilly-developing-android-applications/</link>
		<comments>http://www.omandev.net/2010/02/oreilly-developing-android-applications/#comments</comments>
		<pubDate>Fri, 12 Feb 2010 16:11:38 +0000</pubDate>
		<dc:creator>Arkan Hadi</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[course]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[oreilly]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.omandev.net/?p=281</guid>
		<description><![CDATA[Opinion and notes on OReilly free Android course


Related posts:<ol><li><a href='http://www.omandev.net/2007/10/jcodebase-1-1-beta/' rel='bookmark' title='Permanent Link: JCodeBase 1.1 Beta'>JCodeBase 1.1 Beta</a></li>
<li><a href='http://www.omandev.net/2008/08/adding-a-friendly-splash-waiting-screen-while-the-code-is-being-executed-in-asp/' rel='bookmark' title='Permanent Link: Adding a friendly splash (waiting screen) while the code is being executed in ASP'>Adding a friendly splash (waiting screen) while the code is being executed in ASP</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div class="wp-caption aligncenter" style="width: 580px"><img src="http://linuxhub.net/wp-content/uploads/2009/12/android-logo.jpg" alt="android" width="570" height="356" /><p class="wp-caption-text">android</p></div>
<p>Last week, O&#8217;Reilly started a <a href="http://training.oreilly.com/androidapps/">free training Android course</a>, I had the chance to attend it, all of it, unlike some of my friends who couldn&#8217;t stay up till late night <img src='http://www.omandev.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I also had the chance to take notes, .. I will post the notes of the first lecture at the end of this post (its my notes, do not expect to understand everything from it because you did not write it <img src='http://www.omandev.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  )</p>
<p>the lecture started with the basic principles on how Android works, &#8230; you know .. the &#8220;useless things that is good to know&#8221; sort of things, than some tips on installations and some basic &#8220;flash light&#8221; program, .. and during that whole thing a lot of questions were made by the people watching the course, .. some questions are really irrelevant and useless, while others were interesting.</p>
<p>Before i post my notes i would like to mention my opinion about the course from the first lecture (this opinion is merely my <em>personal </em>opinion). It is my first time coding Android, .. but it is <strong>NOT</strong>my first time coding <img src='http://www.omandev.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>My opinion on Tony the lecturer</strong></p>
<p>He seems to know somethings on Android, more than most of us obviously, but i am afraid that I expected the lecture to be more professional, I mean during the lecture, Tony was exploring the code and how things work, i did not find him mastering the language, &#8230; but in my opinion as long as he is ahead of us at least one step, than praise him <img src='http://www.omandev.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>My humble opinion about the Android programming language</strong></p>
<p>Android relies heavily on user-defined XML tags (or that is what i saw from the first lecture). its not a good or bad thing, .. it is just &#8230; different i guess.</p>
<p>It is a very interesting course and i would like to encourage anyone who has the slightest interest in developing mobile applications to attend this course</p>
<p>Anyways .. without further dues, &#8230; here are my notes <img src='http://www.omandev.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
<code><br />
linux&gt;Native Libraries &gt; Run time + Dalvik VM &gt; andriod framework (activity manager, content Provider, Location manager, Notification manager,..) &gt; System apps (contacts, Phone Dialer, Email, Web Browser)</code></p>
<p><code>app: code + R resources (movie, xml, pic)</code></p>
<p><code>Activity: single screen. app have many activities</code></p>
<p><code>intent: code to accomplish a verb (call number, open contacts)</p>
<p>developer.andriod.com/sdk/eclipse-adt.html</p>
<p>package name &gt; unique<br />
min SDK Version, "API LEVEL", Andriod 1.5 &gt; 3</p>
<p>manifest (Like in J2ME, configuration file)</p>
<p>main.XML have app configuration (like orientation, gravity position of the test")</p>
<p>String.XML<br />
"@String/Hello" &gt; Macros, u can use it for localization</p>
<p>"@String/Red" &gt;&gt; you can set Red= "Red hat" in String.XML</p>
<p>Color.XML</p>
<p>#FFFF0000</p>
<p>android:background="@color/red"</p>
<p>activity &gt; screen &gt; .java</p>
<p>R class generated automatically, each new resource will be added automaticallyin the R class</p>
<p>you can add new elements in main.xml like "button" and you can set its attributes (via XML Tags)</p>
<p><button></button></p>
<p>the @+id adds unique ID by default</p>
<p>in JAVA (RefFlashActivity.Java)<br />
Button greenButton = (Button)findViewById(R.id.green_button);<br />
greenButton.setOnClickListener(new View.OnClickListener(){...})</p>
<p>Intent intent = new intent(activ.this, act2.class);<br />
startActivity(intent);</p>
<p>the above will change from one screen to another.</p>
<p>Here is answer to right to left: Google tracks issues and feature requests at Google Code's site. As of January 2010[update], the most requested ("starred") feature is the support for right-to-left languages such as Arabic and Hebrew.[90][91]</p>
<p>http://developer.android.com/reference/java/text/Bidi.html</p>
<p></code><br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>


<p>Related posts:<ol><li><a href='http://www.omandev.net/2007/10/jcodebase-1-1-beta/' rel='bookmark' title='Permanent Link: JCodeBase 1.1 Beta'>JCodeBase 1.1 Beta</a></li>
<li><a href='http://www.omandev.net/2008/08/adding-a-friendly-splash-waiting-screen-while-the-code-is-being-executed-in-asp/' rel='bookmark' title='Permanent Link: Adding a friendly splash (waiting screen) while the code is being executed in ASP'>Adding a friendly splash (waiting screen) while the code is being executed in ASP</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.omandev.net/2010/02/oreilly-developing-android-applications/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>SharePoint List data with SQL Server Reporting Services</title>
		<link>http://www.omandev.net/2009/05/sharepoint-list-data-with-sql-server-reporting-services/</link>
		<comments>http://www.omandev.net/2009/05/sharepoint-list-data-with-sql-server-reporting-services/#comments</comments>
		<pubDate>Fri, 15 May 2009 07:07:00 +0000</pubDate>
		<dc:creator>Ali AL Lawati</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[reports]]></category>
		<category><![CDATA[sharepoint]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[SSRS]]></category>

		<guid isPermaLink="false">http://66.147.242.194/~omandevn/wrd1/wordpress/?p=59</guid>
		<description><![CDATA[SharePoint is becoming more populler every day, companies from around the world are starting using it as main intranet site of their headoffice.

since sharepoint provide (as promissed by microsoft) the highest compatibility with Microsoft Office , exchange server, active directory and combine them all into a intranet portal.

many companies started using this software either publishing [...]


Related posts:<ol><li><a href='http://www.omandev.net/2008/11/sharepoint-splistitem/' rel='bookmark' title='Permanent Link: sharepoint SPListItem'>sharepoint SPListItem</a></li>
<li><a href='http://www.omandev.net/2008/08/increasing-performance-and-adding-flexibility-using-arrays-instead-of-recordsets-in-asp-with-databases/' rel='bookmark' title='Permanent Link: Increasing performance and adding flexibility using arrays instead of recordsets in ASP with databases'>Increasing performance and adding flexibility using arrays instead of recordsets in ASP with databases</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.sharepointmn.com/User%20Group%20Presentations/SharePoint%20Wheel.jpg"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 155px; height: 152px;" src="http://www.sharepointmn.com/User%20Group%20Presentations/SharePoint%20Wheel.jpg" alt="" border="0" /></a><br />SharePoint is becoming more populler every day, companies from around the world are starting using it as main intranet site of their headoffice.
<div></div>
<div>since sharepoint provide (as promissed by microsoft) the highest compatibility with Microsoft Office , exchange server, active directory and combine them all into a intranet portal.</div>
<div></div>
<div>many companies started using this software either publishing site ( where anouncements &amp; news could be easily shared with employees) , or team sites ( to manage work of small teams and assigning tasks to them) , or document center, or other many things.<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://powerofthought.files.wordpress.com/2008/12/sql_server_2005.jpg"><img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 128px; height: 164px;" src="http://powerofthought.files.wordpress.com/2008/12/sql_server_2005.jpg" alt="" border="0" /></a></div>
<div></div>
<div>Having huge amount of requirments of bespoke (custom) softwares that fullfill working enviroments needs developer having access to shareponit started using the lists &amp; content types capabilities to create small &amp; medium custom applications based on sharepoint lists </div>
<div>(well if that is good or bad is another issue but i think these two links clearify them <a href="http://stackoverflow.com/questions/250992/sharepoint-should-i-use-lists-or-a-database">link1 </a>, <a href="http://stackoverflow.com/questions/184653/sharepoint-lists-vs-database-tables-performance#184816">link2 </a>).</div>
<div></div>
<div>Any how having these applications raise the need for reporting tool to genirated reports depending on the data entered in sharepoint lists/conent types, <span class="Apple-style-span" style="font-weight: bold;">and for my suprise </span> Microsoft&#8217;s <span class="Apple-style-span" style="font-weight: bold;">best reporting tool SSRS (SQL Server Reporting Services) </span><span class="Apple-style-span" style="font-weight: bold;"> don&#8217;t have a nice way to provide this functionality. </span>This thing made me search for ways of doing this and here are my findings:</div>
<div></div>
<div>eventhough SSRS do not connect in a straigh forward way to SQL server we can have workarounds :</div>
<p>
<div>1- C<span class="Apple-style-span" style="border-collapse: collapse; line-height: 18px;font-family:Arial;font-size:14;"  >onnecting to SharePoint web service out put XML, the problem here is it sometimes work and sometimes don&#8217;t, and also i couldn&#8217;t do inner join between different lists may be it is there but it will be trouble to do it.</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse; line-height: 18px;font-family:Arial;font-size:14;"  ><br /></span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse; line-height: 18px;font-family:Arial;font-size:14;"  >2- <span style="font-weight: bold;"></span></span>C<span class="Apple-style-span" style="border-collapse: collapse; line-height: 18px;font-family:Arial;font-size:14;"  ><span style="font-weight: bold;"></span>reating a link table in MS Access 2007 that links to sharepoint lists (<span class="Apple-style-span" style="font-weight: bold;">amazingly this is very easy </span>), and then connect to the MS ACCESS link tables from SSRS 2005 : this will work but i am kind of scared of having ACCESS in the middle i always want to avoid using access (do you suggest this way please write comments)</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse; line-height: 18px;font-family:Arial;font-size:14;"  ><br /></span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse; line-height: 18px;font-family:Arial;font-size:14;"  >3- </span>C<span class="Apple-style-span" style="border-collapse: collapse; line-height: 18px;font-family:Arial;font-size:14;"  >onnecting to the views provided in the sharepoints backend database (there is a view for all lists and another view for all list items) : here column names will be troublsome to create the query the clounm names are like (float1,float2,&#8230;,date1,date2,date3,&#8230;.) , also i am not sure if it is good thing to make SSRS talk directly to sharepoints backend database views</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse; line-height: 18px;font-family:Arial;font-size:14;"  ><br /></span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse; line-height: 18px;font-family:Arial;font-size:14;"  >well these are the work arounds i could find for using SSRS as a reporting tool for SharePoint , but if you are willing to invest a bit to make this thing possible there are some plug-ins that provide this functionality such as  <span class="Apple-style-span" style="border-collapse: separate; line-height: 17px;font-family:Helvetica;font-size:13;"  > <a href="http://www.enesyssoftware.com/" rel="nofollow" style="color: rgb(0, 51, 102);">Enesys RS Data Extension </a><span class="Apple-style-span" style="border-collapse: collapse; line-height: 18px;font-family:Arial;font-size:14;"  > but again not sure how good they are in performance and other stuff.</span></span></span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse; line-height: 18px;font-family:Arial;font-size:14;"  ><br /></span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse; line-height: 18px;font-family:Arial;font-size:14;"  >hope this post will help you if you are dealing with SharePoint , feel free to discuss any thing and leave comments.</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse; line-height: 18px;font-family:Arial;font-size:14;"  ><br /><span style="font-size:100%;"><span style="font-weight: bold;">update 16/5/2009<br /></span>4- the fourth way is to map the list directly to a database (Well i didn&#8217;t wrote that because two things first it is redundancy, second it is hard to keep updating both the database and sharepoint lists when-ever any change happens to any record, but Mr. Allan seems to have a great solution for that in the comments which is &#8220;SLAM<span style="font-weight: bold;"><span style="font-weight: bold;"><span style="font-weight: bold;"> </span>&#8221; </span></span></span></span> (http://slam.codeplex.com)</p>
<p>SLAM allows you to easily maintain SharePoint data by hooking up against lists (or content types!) and having the data automatically synchronized with SQL server in real time. Best of all, it converts SharePoint look-ups to associations (with any multiplicity, one to one, one to many, many to many) that you can easily built queries against.</p>
<p>Thanks a for letting us know about this tool<br /><span class="Apple-style-span" style="border-collapse: collapse; line-height: 18px;font-family:Arial;font-size:14;"  ><span style="font-size:100%;"><span style="font-weight: bold;"><span style="font-weight: bold;">update 21/5/2009 :<br /></span></span><span><span>Well this time i tried the 2nd way on production (it works very well while it is on my machine in visual studio) but if we need to add it to the reporting services server it didn&#8217;t work on my enviroment not sure if it works on other enviroments<br /></span></span></span></span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse; line-height: 18px;font-family:Arial;font-size:14;"  ><br /></span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse; line-height: 18px;font-family:Arial;font-size:14;"  ><br /></span></div>
<div class="blogger-post-footer">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
omandev.net English feed</div>


<p>Related posts:<ol><li><a href='http://www.omandev.net/2008/11/sharepoint-splistitem/' rel='bookmark' title='Permanent Link: sharepoint SPListItem'>sharepoint SPListItem</a></li>
<li><a href='http://www.omandev.net/2008/08/increasing-performance-and-adding-flexibility-using-arrays-instead-of-recordsets-in-asp-with-databases/' rel='bookmark' title='Permanent Link: Increasing performance and adding flexibility using arrays instead of recordsets in ASP with databases'>Increasing performance and adding flexibility using arrays instead of recordsets in ASP with databases</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.omandev.net/2009/05/sharepoint-list-data-with-sql-server-reporting-services/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Why Python</title>
		<link>http://www.omandev.net/2009/01/why-python/</link>
		<comments>http://www.omandev.net/2009/01/why-python/#comments</comments>
		<pubDate>Tue, 06 Jan 2009 07:33:00 +0000</pubDate>
		<dc:creator>Ali AL Lawati</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://66.147.242.194/~omandevn/wrd1/wordpress/?p=56</guid>
		<description><![CDATA[        Why Python
I am used to programe in  Java  at home and on almost all my personal projects , in my work place i am a C# guy (well in work place they only use .NET   ) and this is because in college days [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://gndx.org/wp-content/uploads/2008/06/280px-python_logo.png"><img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 280px; height: 280px;" src="http://gndx.org/wp-content/uploads/2008/06/280px-python_logo.png" alt="" border="0" /></a><br />        Why Python</p>
<p>I am used to programe in  Java  at home and on almost all my personal projects , in my work place i am a C# guy (well in work place they only use .NET <img src='http://www.omandev.net/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  ) and this is because in college days all we have been exposed to were OO languages like C++, Java, .NET and that what we are using till now.</p>
<p>As scripting languages,  developers around here are far away from them, may be the only scripting language used heavily  in this side of the world is PHP, and the most powerfull  JavaScript and thats it. I decieded that i want to learn a new programming language and it has to be a scripting language this time, i was looking for Ruby,pearl &amp; python to learn one of them. Finally my choice was python and thats why i hope i will be able to put small tips and tricks of what ever i learn in python here on this blog.</p>
<p>In this blog i am just talking about why i am intrested in learning python , well first since i am used to java and C# and they are statically typed languages I don&#8217;t experiance a lot the beauty of dynamically typed language where i dont have to declare variables or specify its type, also in dynamically typed language i will be able to use a variable as integer and after few lines i will use it as string , then again i can use it as an object of my class called money, or what ever else very easily.Another benifit of dynamic typing is that i can have a set, an array that contain compeletly different types of variable that while retriving them i dont have to cast them to their types which really simplifies a lot of rutine work</p>
<p>Other than being dynamically typed language python is very compact compared to java &amp; C#, so typing is less, what ever you type in python will be used to solve your problem not the language problems as in the big OO languages</p>
<p>lets say i want to create  a class  constractor that meight take a variable or two variable, or three variables.</p>
<div>
<table class="zeroBorder" id="hn53" border="0" cellpadding="3" cellspacing="0" width="100%">
<tbody>
<tr>
<td width="50%">do that in java</td>
<td width="50%">do that in python</td>
</tr>
<tr>
<td width="50%">
<pre>public class MyclassName{

public MyclassName(String var1)  {      this(var1, 1);  }

  //--------- constructor #2 -------------  public MyclassName(String var1, int var2)  {     this(var1, var2, "single");  }

  //--------- constructor #3 -------------  public MyclassName(String var1,         int var2,         String var3)  {     this.att1= var1;     this.att2= var2;     this.att3= var3;  }</pre>
</td>
<td width="50%">
<pre>class MyclassName():

  def __init__(self,      var1, var2=1, var3="single"):

      self.att1= var1<span>    </span><span>   </span>self.att2= var2      self.att3= var3</pre>
</td>
</tr>
</tbody>
</table>
</div>
<p>
<div>
<table class="zeroBorder" id="gp17" border="0" cellpadding="3" cellspacing="0" width="100%">
<tbody>
<tr>
<td width="50%">to open file in java</td>
<td width="50%">
<pre>to open file in python </pre>
</td>
</tr>
<tr>
<td width="50%">
<pre>BufferedReader br=  new BufferedReader(      new FileReader(filename));</pre>
</td>
<td width="50%">
<pre>fileName = open(filename)</pre>
</td>
</tr>
</tbody>
</table>
</div>
<p>so i think if i master python or any similler language (Ruby, pearl) i will have to type less and be able to concentrate more on solving the problems i am working on.</p>
<p>Another new thing in this kind of language is they support functions as first class entity in the language, so functions could be stored in data structured and passed as arguments to other functions (not as pointers like in C++) Also functions could be created dynamically while the programe is running which i am sure will be very usefull, i have never though of using a dynamically created functions since none of my programe worlds supported that before. if you are new to this like me and need example check <a title="this" href="http://www.joelonsoftware.com/items/2006/08/01.html" id="jw_y">this</a></p>
<pre>well i guess after all of these reasons it still didnt come to python, cause these reasons just show i want to learn an scripting language with the mentioned properties that could be any of <a href="http://en.wikipedia.org/wiki/Perl" title="Perl">Perl</a>, <a href="http://en.wikipedia.org/wiki/Python_%28programming_language%29" title="Python (programming language)">Python</a>, <a href="http://en.wikipedia.org/wiki/PHP" title="PHP">PHP</a>, <a href="http://en.wikipedia.org/wiki/Lua_programming_language" title="Lua programming language" class="mw-redirect">Lua</a>, <a href="http://en.wikipedia.org/wiki/Tcl" title="Tcl">Tcl/Tk</a>, <a href="http://en.wikipedia.org/wiki/ECMAScript" title="ECMAScript">ECMAScript</a> (<a href="http://en.wikipedia.org/wiki/JavaScript" title="JavaScript">JavaScript</a>, <a href="http://en.wikipedia.org/wiki/ActionScript" title="ActionScript">ActionScript</a>), <a href="http://en.wikipedia.org/wiki/Ruby_programming_language" title="Ruby programming language" class="mw-redirect">Ruby</a>, <a href="http://en.wikipedia.org/wiki/Io_programming_language" title="Io programming language" class="mw-redirect">Io</a>, <a href="http://en.wikipedia.org/wiki/Scala_programming_language" title="Scala programming language" class="mw-redirect">Scala</a>, or <a href="http://en.wikipedia.org/wiki/Nemerle" title="Nemerle">Nemerle</a>. I guess then it is true i wanted to learn python just because it is python <img src='http://www.omandev.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> may be another reason is it is very known, supported heavily by Google, in their app engine !

to be honest i was thinking about ruby too. but after some search i found some information that made me like python more that are many blogs says the error messages in ruby compiler are not very much informative compared to python. Another reason is there is a lot of ways of doing the same thing in ruby which is good but can make a new language somewhat confusing. Also the fact that GUI libraries for Ruby they are very limited and in python there are a lot of libraries + default librari that comes with python itself

so i prefered python .so hope fully i will be able to put some small python tips or tutorials as soon as possible.

</pre>
<div class="blogger-post-footer">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
omandev.net English feed</div>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.omandev.net/2009/01/why-python/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>sql Tip 3: getting DB schema in MYSQL</title>
		<link>http://www.omandev.net/2009/01/sql-tip-3-getting-db-schema-in-mysql/</link>
		<comments>http://www.omandev.net/2009/01/sql-tip-3-getting-db-schema-in-mysql/#comments</comments>
		<pubDate>Sun, 04 Jan 2009 20:13:00 +0000</pubDate>
		<dc:creator>Ali AL Lawati</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://66.147.242.194/~omandevn/wrd1/wordpress/?p=55</guid>
		<description><![CDATA[long time since my last post here, well i was bit busy , hopefully i will not stop bloging for long times again.
for this blog the title actually shouldn&#8217;t be SQL tip 3 , it  should be MYSQL tip 3, since it is talking about something specific to MYSQL, but since i had two [...]


Related posts:<ol><li><a href='http://www.omandev.net/2007/07/sqltip1-search-database-faster-without-like/' rel='bookmark' title='Permanent Link: SQLTip1: search database faster without like'>SQLTip1: search database faster without like</a></li>
<li><a href='http://www.omandev.net/2007/08/sqltip2-how-to-display-rows-as-columns/' rel='bookmark' title='Permanent Link: SQLTip2: how to display rows as columns'>SQLTip2: how to display rows as columns</a></li>
<li><a href='http://www.omandev.net/2009/01/popular-posts-of-omandev/' rel='bookmark' title='Permanent Link: popular posts of OmanDev'>popular posts of OmanDev</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>long time since my last post here, well i was bit busy , hopefully i will not stop bloging for long times again.</p>
<p>for this blog the title actually shouldn&#8217;t be SQL tip 3 , it  should be MYSQL tip 3, since <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.yusoft.net/yu-graph/main/logo-mysql.jpg"><img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 99px; height: 71px;" src="http://www.yusoft.net/yu-graph/main/logo-mysql.jpg" alt="" border="0" /></a>it is talking about something specific to MYSQL, but since i had two (very old) posts about sql tips <a href="http://www.omandev.net/2007/07/sqltip1-search-database-faster-without.html">SQL tip1</a> <a href="http://www.omandev.net/2007/08/sqltip2-how-to-display-rows-as-columns.html">SQL tip2</a> ,well they were geniral but were demonistrated in MYSQL too.</p>
<p>back to the topic. i needed to know how to get the database schema for a MYSQL DB in one of my projects and knowing the how was not stright forward so thats why i think it will be good and usefull tip.</p>
<p>A very usefull information in this topic is that information on database tables is stored in a system table called &#8220;<span style="font-weight: bold;">information_schema.tables </span>&#8220;.However a better information is writting the query &#8220;<span style="font-weight: bold;">select * FROM information_schema.tables </span>&#8221; will get you some of the tables that you never had created (system tables) + your tables. to exclude system tables you have to add a where condition</p>
<p>&#8220;<span style="font-weight: bold;">select * FROM information_schema.tables where version=&#8217;10&#8242;</span>&#8220;<span style="font-weight: bold;"> </span>this will show only the tables you have created. version is not related to the version of your MYSQL, but older versions of MYSQL you have to write &#8220;<span style="font-weight: bold;">select * FROM information_schema.tables where version=&#8217;9&#8242;</span>&#8220;.Another simpller way you can know the table information without taking care of table version is to query based on the database name &#8220;<span style="font-weight: bold;">select * FROM information_schema.tables where table_schema =&#8217;DB_Name&#8217;</span>&#8220;</p>
<p>ok we have the table information but still we will need column information of these tables. These information could be extracted from another system table called <span style="font-weight: bold;">information_schema.`COLUMNS` </span></p>
<p>a very simple query could give the most important information of your table&#8217;s columns is<br />&#8220;<span style="font-weight: bold;">SELECT column_name,data_type,column_key FROM information_schema.`COLUMNS`  WHERE table_schema=&#8217;</span><span style="font-weight: bold;">DB_Name</span><span style="font-weight: bold;">&#8216;  and table_name = &#8216;your_table_name&#8217;;</span>&#8220;</p>
<p>hope this very simple tip will be helpful to the readers as an extra knowledge or for those who come to this page searching through google hope this information will aid you
<div class="blogger-post-footer">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
omandev.net English feed</div>


<p>Related posts:<ol><li><a href='http://www.omandev.net/2007/07/sqltip1-search-database-faster-without-like/' rel='bookmark' title='Permanent Link: SQLTip1: search database faster without like'>SQLTip1: search database faster without like</a></li>
<li><a href='http://www.omandev.net/2007/08/sqltip2-how-to-display-rows-as-columns/' rel='bookmark' title='Permanent Link: SQLTip2: how to display rows as columns'>SQLTip2: how to display rows as columns</a></li>
<li><a href='http://www.omandev.net/2009/01/popular-posts-of-omandev/' rel='bookmark' title='Permanent Link: popular posts of OmanDev'>popular posts of OmanDev</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.omandev.net/2009/01/sql-tip-3-getting-db-schema-in-mysql/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to change the Size of a Legend in Crystal Report and MS Access</title>
		<link>http://www.omandev.net/2008/11/how-to-change-the-size-of-a-legend-in-crystal-report-and-ms-access/</link>
		<comments>http://www.omandev.net/2008/11/how-to-change-the-size-of-a-legend-in-crystal-report-and-ms-access/#comments</comments>
		<pubDate>Fri, 14 Nov 2008 19:36:00 +0000</pubDate>
		<dc:creator>szakwani</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[crystal report legend]]></category>
		<category><![CDATA[crytstal report]]></category>
		<category><![CDATA[MS Access]]></category>
		<category><![CDATA[MS ACCESS Legend]]></category>

		<guid isPermaLink="false">http://66.147.242.194/~omandevn/wrd1/wordpress/?p=52</guid>
		<description><![CDATA[Steps on how to change a legend font size on Crystal Reports and text on MS ACCESS pivot charts.
Well as easy as it may seem, this sometimes proves to be a tedious task to look for. Simply because the legends functionality are not provided on the legend display area. Well enough talk and lets learn [...]


Related posts:<ol><li><a href='http://www.omandev.net/2008/07/how-to-change-the-size-of-a-legend-in-crystal-report/' rel='bookmark' title='Permanent Link: How to change the size of a legend in Crystal Report'>How to change the size of a legend in Crystal Report</a></li>
<li><a href='http://www.omandev.net/2007/07/how-to-create-a-search-tool-in-a-few-steps-ms-access/' rel='bookmark' title='Permanent Link: How to create a Search tool in a few steps (MS Access)'>How to create a Search tool in a few steps (MS Access)</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><span style="font-style: italic;">Steps on how to change a legend font size on Crystal Reports and text on MS ACCESS pivot charts.</span></p>
<p>Well as easy as it may seem, this sometimes proves to be a tedious task to look for. Simply because the legends functionality are not provided on the legend display area. Well enough talk and lets learn how to do that in a few steps</p>
<p>Obviously you are creating a graph (chart of some kind),<br />   * Right click on the Chart Area,<br />   * Chart Expert<br />   * Text Tab<br />   * On the Format Area choose Legend,<br />   * Click the Font button<br />   * Change the font to the your desired display</p>
<p><span style="font-weight: bold;">For MS ACCESS</span><br />changing the legend size does not seem to be a problem but the legend caption is.</p>
<p>The Simplest way to change/remove the &#8220;Sum of&#8230;&#8221; text, or any text, in a LEGEND PivotChart.</p>
<p>   * Switch from PivotChart View to PivotTable View<br />   * Click once to highlight the field name that reads &#8220;Sum of&#8230;&#8221;<br />   * Go to properties<br />   * Select the &#8220;caption&#8221; tab<br />   * On the title &#8220;caption&#8221; type in the new text you would like<br />   * Change the view to pivot chart
<div class="blogger-post-footer">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
omandev.net English feed</div>


<p>Related posts:<ol><li><a href='http://www.omandev.net/2008/07/how-to-change-the-size-of-a-legend-in-crystal-report/' rel='bookmark' title='Permanent Link: How to change the size of a legend in Crystal Report'>How to change the size of a legend in Crystal Report</a></li>
<li><a href='http://www.omandev.net/2007/07/how-to-create-a-search-tool-in-a-few-steps-ms-access/' rel='bookmark' title='Permanent Link: How to create a Search tool in a few steps (MS Access)'>How to create a Search tool in a few steps (MS Access)</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.omandev.net/2008/11/how-to-change-the-size-of-a-legend-in-crystal-report-and-ms-access/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>sharepoint SPListItem</title>
		<link>http://www.omandev.net/2008/11/sharepoint-splistitem/</link>
		<comments>http://www.omandev.net/2008/11/sharepoint-splistitem/#comments</comments>
		<pubDate>Thu, 06 Nov 2008 08:15:00 +0000</pubDate>
		<dc:creator>Ali AL Lawati</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[enterprise]]></category>
		<category><![CDATA[lits]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[portal]]></category>
		<category><![CDATA[sharepoint]]></category>

		<guid isPermaLink="false">http://66.147.242.194/~omandevn/wrd1/wordpress/?p=49</guid>
		<description><![CDATA[Shareponit SPListItem
Hello there, well to be honest I am not a fan of Microsoft technologies well any how I cannot live without my XP these days (one of the best things the big M have done), but SharePoint is completely different story. It has a lot of potentials and abilities and once I saw the [...]


Related posts:<ol><li><a href='http://www.omandev.net/2009/05/sharepoint-list-data-with-sql-server-reporting-services/' rel='bookmark' title='Permanent Link: SharePoint List data with SQL Server Reporting Services'>SharePoint List data with SQL Server Reporting Services</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Shareponit SPListItem</p>
<p>Hello there, well to be honest I am not a fan of Microsoft technologies well any how I cannot live without my XP these days (one of the best things the big M have done), but SharePoint is completely different story. It has a lot of potentials and abilities and once I saw the first time I said to myself this will finish all of my working place&#8217;s problems. But I had a feeling something will be wrong in it. To be honest I have faced a lot of challenges many times I was surprised with what SharePoint provides and many many more times I was disappointed with its limitations. But thanks to friends and fellow bloggers who helped a lot out of the problems.</p>
<p>This time I was facing a very strange problem that I am even not sure if it is SharePoint problems or it is just our environment, I was not able to find any similar problem on the net so thought I could document it here.</p>
<p>SharePoint API provides a great API to access list items , search them, add, delete, and update them that save you the effort of reading list information from SharePoint’s database directly, and it is provided in a very nice way. But the updating I have had some strange issue with that I have solved now, but I couldn’t understand why I got it in the first place.</p>
<p>Here I will give you the basics of accessing items from SharePoint Lists and show the issue</p>
<p>To access a list is very simple make a variable and assign it the url where you see the list in the sharepoint</p>
<p><span style="color: rgb(51, 204, 0); font-style: italic;">string </span><span style="font-style: italic;">strDashListRoot = &#8220;</span><span style="color: rgb(255, 0, 0); font-style: italic;">http://[Servername]/[subsite/subsite]/Lists/[list name]/AllItems.aspx</span><span style="font-style: italic;">&#8220;;</span><span style="color: rgb(153, 255, 153); font-style: italic;">// just copy past the link form your browser</span></p>
<p>Then from the link you can get the site and website and the list easily</p>
<p><span style="color: rgb(51, 102, 255); font-style: italic;">using </span><span style="font-style: italic;">(</span><span style="color: rgb(51, 204, 0); font-style: italic;">SPSite </span><span style="font-style: italic;">site = </span><span style="color: rgb(51, 102, 255); font-style: italic;">new </span><span style="font-style: italic;">SPSite(strDashListRoot))</span><br /><span style="font-style: italic;">{</span></p>
<p><span style="color: rgb(51, 102, 255); font-style: italic;">using </span><span style="font-style: italic;">(</span><span style="color: rgb(51, 204, 0); font-style: italic;">SPWeb </span><span style="font-style: italic;">web = site.OpenWeb())</span><br /><span style="font-style: italic;">{</span><br /><span style="color: rgb(51, 204, 0); font-style: italic;">SPList list </span><span style="font-style: italic;">= web.Lists["</span><span style="color: rgb(255, 0, 0); font-style: italic;">listname</span><span style="font-style: italic;">"]; </span><span style="color: rgb(153, 255, 153); font-style: italic;">// do not forget to close the brakets after your code is done } }</span></p>
<p>Now here you can access the list items easily</p>
<p><span style="font-style: italic;"><span style="color: rgb(51, 204, 0);">String </span>information=Lists.items[<span style="color: rgb(51, 102, 255);">2</span>][“<span style="color: rgb(255, 0, 0);">fieldname</span>”].toString(); </span><span style="color: rgb(51, 255, 51); font-style: italic;">// simply put the index of the item you need and then the field name that you want to show</span></p>
<p>Now the main thing here is when we want to change field of the list item we could do easily this</p>
<p><span style="font-style: italic;">Lists.items[<span style="color: rgb(51, 102, 255);">2</span>][“<span style="color: rgb(255, 0, 0);">fieldname</span>”]= “<span style="color: rgb(255, 0, 0);">myvalues</span>”;</span></p>
<p><span style="font-style: italic;">Lists.items[<span style="color: rgb(51, 102, 255);">2</span>].Update();</span></p>
<p>but that didn’t worked in our environment while doing the folling code worked !!!</p>
<p><span style="color: rgb(51, 204, 0); font-style: italic;">SPListItem</span><span style="font-style: italic;"> item = Lists.items[</span><span style="color: rgb(51, 102, 255); font-style: italic;">2</span><span style="font-style: italic;">];</span></p>
<p><span style="font-style: italic;">item[“<span style="color: rgb(255, 0, 0);">fieldname</span>”]= “<span style="color: rgb(255, 102, 102);">myvalues</span>”;</span></p>
<p><span style="font-style: italic;">item.Update();</span></p>
<p>Well may be that is something related to our environment but hope through this simple blog you know how to access and edit SPList items.
<div class="blogger-post-footer">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
omandev.net English feed</div>


<p>Related posts:<ol><li><a href='http://www.omandev.net/2009/05/sharepoint-list-data-with-sql-server-reporting-services/' rel='bookmark' title='Permanent Link: SharePoint List data with SQL Server Reporting Services'>SharePoint List data with SQL Server Reporting Services</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.omandev.net/2008/11/sharepoint-splistitem/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>JavaScript, the language for them all!! (Jquery with gridview in asp.net 2.0)</title>
		<link>http://www.omandev.net/2008/09/javascript-the-language-for-them-all-jquery-with-gridview-in-asp-net-2-0/</link>
		<comments>http://www.omandev.net/2008/09/javascript-the-language-for-them-all-jquery-with-gridview-in-asp-net-2-0/#comments</comments>
		<pubDate>Thu, 04 Sep 2008 07:13:00 +0000</pubDate>
		<dc:creator>Ali AL Lawati</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[2005]]></category>
		<category><![CDATA[datepicker]]></category>
		<category><![CDATA[gridview]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[NET]]></category>
		<category><![CDATA[web2.0]]></category>

		<guid isPermaLink="false">http://66.147.242.194/~omandevn/wrd1/wordpress/?p=38</guid>
		<description><![CDATA[
Once a long time ago (in 80s) I think Assembly was considered the savior for when ever some one need to do some dirty work with their C or whatever language code and its not clear for him how to do it there or few things are not supported assembly comes to give you control [...]


Related posts:<ol><li><a href='http://www.omandev.net/2008/08/calling-asp-functions-from-java-script/' rel='bookmark' title='Permanent Link: Calling ASP Functions from java script'>Calling ASP Functions from java script</a></li>
<li><a href='http://www.omandev.net/2007/05/search_resutls/' rel='bookmark' title='Permanent Link: search_Resutls'>search_Resutls</a></li>
<li><a href='http://www.omandev.net/2007/08/assembly-language-shift-instructions/' rel='bookmark' title='Permanent Link: Assembly Language &#8211; Shift Instructions'>Assembly Language &#8211; Shift Instructions</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p class="western" style="margin-bottom: 0.14in" id="m99k"><span class="Apple-style-span" style="font-weight: bold;"><br /></span></p>
<p class="western" style="margin-bottom: 0.14in" id="m99k0">Once a long time ago (in 80s) I think Assembly was considered the savior for when ever some one need to do some dirty work with their C or whatever language code and its not clear for him how to do it there or few things are not supported assembly comes to give you control on the tiniest transistor on the PC so you can do what ever in your mind (this is not just 80s it is applicable for all times <span  id="m99k1" style="font-family:Wingdings;"></span> )</p>
<p class="western" style="margin-bottom: 0.14in" id="m99k2">In 90s the days of C++, Visual Basic 6.0, JAVA, PHP,… etc I think the savior was the C language, really when ever there was something you cannot do in any of these languages that you are working on, you would just connect it to a c DLL   or any c library file!!, using JNI for Java or active or DLL library for visual basic and similarly for others.</p>
<p class="western" style="margin-bottom: 0.14in" id="m99k3">These days (WEB 2.0 days) all of the applications are moving to web using PHP J2EE, .NET 2005/2008, R on R and others. The common factor between them is they all need JavaScript to do the dirty work for them (working on client machines) so as in old days when all programmers needed to know assembly or as in 90s when all programmers needed to know C to do wonders with their softwares, these days developers must know JavaScript; cause it is the language for them all (applicable to any JavaScript framework (jquery, mootool, prototype))!!!</p>
<p class="western" style="margin-bottom: 0.14in" id="m99k4">Ok that’s enough chit chat, now why I am talking all about this?? Because jquery enabled me to do something fun with asp.net 2.0’s gridview  </p>
<p class="western" style="margin-bottom: 0.14in" id="m99k5">
<p class="western" style="margin-bottom: 0.14in" id="m99k8">I will show you</p>
<p class="western" style="margin-bottom: 0.14in" id="m99k9">I have added a jscript folder to my project and in it I have added the jquery and one of its plug-in: datepicker which will show a date picker calendar</p>
<p class="western" style="margin-bottom: 0.14in" id="m99k10"><img src="http://docs.google.com/File?id=dhxndmq_1065drm38jqs_b" name="Object1" align="BOTTOM" width="194" height="97" id="m99k11" /></p>
<p class="western" style="margin-bottom: 0.14in" id="m99k12">Added jquery to my master page code so it will be available to all of my pages in the application that uses this master page</p>
<p class="western" style="margin-bottom: 0.14in" id="m99k13"><span  id="m99k14" style="font-size:85%;"><span  id="m99k15" style="font-family:Courier New, monospace;"><span  id="m99k16" style="color:#0000ff;">&lt;</span><span  id="m99k17" style="color:#800000;">script</span> <span  id="m99k18" style="color:#ff0000;">type</span><span  id="m99k19" style="color:#0000ff;">=&#8221;text/javascript&#8221;</span> <span  id="m99k20" style="color:#ff0000;">src</span><span  id="m99k21" style="color:#0000ff;">=&#8221;Jscript/jquery-1.2.1.min.js&#8221;>&lt;/</span><span  id="m99k22" style="color:#800000;">script</span><span  id="m99k23" style="color:#0000ff;">></span></span></span></p>
<p class="western" style="margin-bottom: 0.14in; page-break-before: always" id="m99k24">
<p class="western" style="margin-bottom: 0.14in" id="m99k27">Now I have a gridview (well for my application need I have a very complex 3 level nested gridview)</p>
<p class="western" style="margin-bottom: 0.14in" id="m99k28"><img src="http://docs.google.com/File?id=dhxndmq_1066hcmg4qqq_b" name="Object2" align="BOTTOM" width="387" height="290" id="m99k29" /></p>
<p class="western" style="margin-bottom: 0.14in" id="m99k30">Now close date is a template column where I have a textbox  <img src="http://docs.google.com/File?id=dhxndmq_1067f3jbsfgz_b" name="Object3" align="BOTTOM" width="194" height="194" id="m99k32" />  I made the cssclass of the text box equals to “datepickerz” <span  id="m99k35" style="font-size:85%;"><span  id="m99k36" style="font-family:Courier New, monospace;"><span  id="m99k37" style="color:#0000ff;">&lt;</span><span  id="m99k38" style="color:#800000;">asp</span><span  id="m99k39" style="color:#0000ff;">:</span><span  id="m99k40" style="color:#800000;">TextBox</span> <span  id="m99k41" style="color:#ff0000;">ID</span><span  id="m99k42" style="color:#0000ff;">=&#8221;TextBox1&#8243;</span> <span  id="m99k43" style="color:#ff0000;">runat</span><span  id="m99k44" style="color:#0000ff;">=&#8221;server&#8221;</span> <span  id="m99k45" style="color:#ff0000;">Text</span><span  id="m99k46" style="color:#0000ff;">=&#8217;</span><span style="background: #ffff00" id="m99k47">&lt;%</span># Bind(&#8220;close_date&#8221;) <span style="background: #ffff00" id="m99k48">%></span><span  id="m99k49" style="color:#0000ff;">&#8216;</span> <span  id="m99k50" style="color:#ff0000;">CssClass</span><span  id="m99k51" style="color:#0000ff;">=&#8221;datepickerz&#8221;</span> <span  id="m99k52" style="color:#ff0000;">Width</span><span  id="m99k53" style="color:#0000ff;">=&#8221;89px&#8221;>&lt;/</span><span  id="m99k54" style="color:#800000;">asp</span><span  id="m99k55" style="color:#0000ff;">:</span><span  id="m99k56" style="color:#800000;">TextBox</span><span  id="m99k57" style="color:#0000ff;">></span></span></span></p>
<p class="western" style="margin-bottom: 0.14in" id="m99k58">Now I need for each row in this complex gridview the textbox to be a datepicker so simply I wrote the following jquery script</p>
<p class="western" style="margin-bottom: 0in; line-height: 100%" id="m99k59">     <span  id="m99k60" style="font-size:85%;"><span  id="m99k61" style="font-family:Courier New, monospace;"><span  id="m99k62" style="color:#0000ff;">&lt;</span><span  id="m99k63" style="color:#800000;">script</span> <span  id="m99k64" style="color:#ff0000;">type</span><span  id="m99k65" style="color:#0000ff;">=&#8221;text/javascript&#8221;</span> <span  id="m99k66" style="color:#ff0000;">src</span><span  id="m99k67" style="color:#0000ff;">=&#8221;Jscript/ui.datepicker.js&#8221;>&lt;/</span><span  id="m99k68" style="color:#800000;">script</span><span  id="m99k69" style="color:#0000ff;">></span></span></span></p>
<p class="western" style="margin-bottom: 0in; line-height: 100%" id="m99k70">     <span  id="m99k71" style="font-size:85%;"><span  id="m99k72" style="font-family:Courier New, monospace;"><span  id="m99k73" style="color:#0000ff;">&lt;</span><span  id="m99k74" style="color:#800000;">script</span> <span  id="m99k75" style="color:#ff0000;">type</span><span  id="m99k76" style="color:#0000ff;">=&#8221;text/javascript&#8221;</span> <span  id="m99k77" style="color:#0000ff;">></span> </span></span> </p>
<p class="western" style="margin-bottom: 0in; line-height: 100%" id="m99k78">
<p class="western" style="margin-bottom: 0in; line-height: 100%" id="m99k79">
<p class="western" style="margin-bottom: 0in; line-height: 100%" id="m99k80">             <span  id="m99k81" style="font-size:85%;"><span  id="m99k82" style="font-family:Courier New, monospace;">$(document).ready(<span  id="m99k83" style="color:#0000ff;">function</span>() {</span></span></p>
<p class="western" style="margin-bottom: 0in; line-height: 100%" id="m99k84">                  <span  id="m99k85" style="font-size:85%;"><span  id="m99k86" style="font-family:Courier New, monospace;">$(<span  id="m99k87" style="color:#800000;">&#8216;.datepickerz&#8217;</span>).each( <span  id="m99k88" style="color:#0000ff;">function</span> () {</span></span></p>
<p class="western" style="margin-bottom: 0in; line-height: 100%" id="m99k89">                         <span  id="m99k90" style="font-size:85%;"><span  id="m99k91" style="font-family:Courier New, monospace;">$(<span  id="m99k92" style="color:#0000ff;">this</span>).attachDatepicker();</span></span></p>
<p class="western" style="margin-bottom: 0in; line-height: 100%" id="m99k93">                 <span  id="m99k94" style="font-family:Courier New, monospace;"><span  id="m99k95" style="font-size:85%;">});</span></span></p>
<p class="western" style="margin-bottom: 0in; line-height: 100%" id="m99k96">          <span  id="m99k97" style="font-family:Courier New, monospace;"><span  id="m99k98" style="font-size:85%;">});    </span></span> </p>
<p class="western" style="margin-bottom: 0.14in" id="m99k99">    <span  id="m99k100" style="font-size:85%;"><span  id="m99k101" style="font-family:Courier New, monospace;"><span  id="m99k102" style="color:#0000ff;">&lt;/</span><span  id="m99k103" style="color:#800000;">script</span><span  id="m99k104" style="color:#0000ff;">></span></span></span></p>
<p class="western" style="margin-bottom: 0.14in" id="m99k105">Which is one of the beautiful magic of jquery it allows to pick all controls that have been assigned the class <span  id="m99k106" style="font-size:85%;"><span  id="m99k107" style="font-family:Courier New, monospace;"><span  id="m99k108" style="color:#800000;">datepickerz </span></span></span>and then for each control I just attach it with the datepicker.</p>
<p class="western" style="margin-bottom: 0.14in" id="m99k109">The result whenever I click on the textbox in any editable row in the complex gridview I will get a floating calendar to select a date that will be stored in the textbox.</p>
<p class="western" style="margin-bottom: 0.14in" id="m99k110">I know I have not discovered the atoms by doing this simple activity, but I wanted to mention it because as I see around me (in Oman) most of .NET developers are not aware of Jquery and other JavaScript frameworks and their features.</p>
<div class="blogger-post-footer">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
omandev.net English feed</div>


<p>Related posts:<ol><li><a href='http://www.omandev.net/2008/08/calling-asp-functions-from-java-script/' rel='bookmark' title='Permanent Link: Calling ASP Functions from java script'>Calling ASP Functions from java script</a></li>
<li><a href='http://www.omandev.net/2007/05/search_resutls/' rel='bookmark' title='Permanent Link: search_Resutls'>search_Resutls</a></li>
<li><a href='http://www.omandev.net/2007/08/assembly-language-shift-instructions/' rel='bookmark' title='Permanent Link: Assembly Language &#8211; Shift Instructions'>Assembly Language &#8211; Shift Instructions</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.omandev.net/2008/09/javascript-the-language-for-them-all-jquery-with-gridview-in-asp-net-2-0/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Adding a friendly splash (waiting screen) while the code is being executed in ASP</title>
		<link>http://www.omandev.net/2008/08/adding-a-friendly-splash-waiting-screen-while-the-code-is-being-executed-in-asp/</link>
		<comments>http://www.omandev.net/2008/08/adding-a-friendly-splash-waiting-screen-while-the-code-is-being-executed-in-asp/#comments</comments>
		<pubDate>Mon, 25 Aug 2008 15:15:00 +0000</pubDate>
		<dc:creator>Arkan Hadi</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[activity]]></category>
		<category><![CDATA[asp]]></category>
		<category><![CDATA[borwser]]></category>
		<category><![CDATA[buffer]]></category>
		<category><![CDATA[flush]]></category>
		<category><![CDATA[indicator]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[loading]]></category>
		<category><![CDATA[please wait]]></category>
		<category><![CDATA[screen]]></category>
		<category><![CDATA[splash]]></category>
		<category><![CDATA[vbscript]]></category>
		<category><![CDATA[waiting screen]]></category>

		<guid isPermaLink="false">http://66.147.242.194/~omandevn/wrd1/wordpress/?p=37</guid>
		<description><![CDATA[Nowadays, most websites are connected to databases. the larger the data in the database, the longer it takes for the browser (or the code) to fetch/retrieve the required data for the user. and ofcourse, that&#8217;s where the developers&#8217; skills comes handy, where developing an efficient code and using the minimum queries as possible is a [...]


Related posts:<ol><li><a href='http://www.omandev.net/2008/08/increasing-performance-and-adding-flexibility-using-arrays-instead-of-recordsets-in-asp-with-databases/' rel='bookmark' title='Permanent Link: Increasing performance and adding flexibility using arrays instead of recordsets in ASP with databases'>Increasing performance and adding flexibility using arrays instead of recordsets in ASP with databases</a></li>
<li><a href='http://www.omandev.net/2008/08/calling-asp-functions-from-java-script/' rel='bookmark' title='Permanent Link: Calling ASP Functions from java script'>Calling ASP Functions from java script</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Nowadays, most websites are connected to databases. the larger the data in the database, the longer it takes for the browser (or the code) to fetch/retrieve the required data for the user. and ofcourse, that&#8217;s where the developers&#8217; skills comes handy, where developing an efficient code and using the minimum queries as possible is a must. i would like to add that having a little data in the database is not an excuse for not developing an efficient code for retrieving information from databases.</p>
<p>now, i assume that you &#8220;developers&#8221; did the most efficient way to retrieve the data, but above that there is still a considerable &#8220;fetching&#8221; time to wait inorder to fully display the records queried, here comes the benefit of adding a splash screen for the user, so he/she doesn&#8217;t panic and think that the page is stuck or something.</p>
<p>easy steps to follow inorder to get an attractive waiting screen (see below) while the code is processing and the user is waiting:<br />
<a href="http://3.bp.blogspot.com/_6WykegKtLic/SLLRKCYamgI/AAAAAAAAAAo/30HH_MyYk0s/s1600-h/screen.JPG" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img id="BLOGGER_PHOTO_ID_5238479286953482754" style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_6WykegKtLic/SLLRKCYamgI/AAAAAAAAAAo/30HH_MyYk0s/s320/screen.JPG" border="0" alt="" /></a></p>
<p>first of all you need to add one important line of code to the top of your ASP page, that line is:</p>
<p><strong>&lt;%Response.Buffer = True%&gt;</strong></p>
<p>This line tells the server not to send anything to the client until the page is finished processing or you use &#8220;Response.Flush&#8221; code in part of your ASP page to send everything fully loaded so far.</p>
<p>now just add the following to javascript functions to your code between &#8220;script&#8221; tags, those functions are used to &#8220;show&#8221; and &#8220;hide&#8221; the splash screen when needed:</p>
<pre><code>

function showObj(obj){obj.style.visibility = "visible";}

function hideObj(obj)

{obj.style.visibility = "hidden";}</code></pre>
<p>now after we created the functions we create the part that gonna show as &#8220;splash&#8221; screen, i created it as &#8220;div&#8221; as it can contain more then one element inside it not just an animated image or text..</p>
<pre><code>  &lt;div id="splashScreen" style="position:absolute;z-index:5;align:center;"&gt;           Searching, please wait .. &lt;br&gt;          &lt;img src="loada.gif"/&gt;

  &lt;/div&gt;

</code></pre>
<p>its strongly recommended to put this div as close as possible to the nearest element after you invoke a &#8220;search&#8221; button or a &#8220;submit&#8221; button so the div would show as soon as the &#8220;fetching&#8221; face starts</p>
<p>you can put any animated &#8220;gif&#8221; pic in the img src, i choose to put a loading indicator, you can find a very nice collection of activity indicators from http://www.ajaxload.info/</p>
<p>after you put the div in the right position, you should put the &#8220;Response.Flush&#8221; code so you tell the browser to show to the user everything loaded so far &#8220;including the splash screen&#8221; and then do the processing, code executing and searching. after that you do &#8220;Response.Flush&#8221; again to show the information fetched, and finally you hide the &#8220;splash screen&#8221; .. so to make it simple, your code would be like the following:</p>
<pre><code>&lt;%..Response.Flush  'this will show everything loaded so far including the splash screen.'... put the searching/fetching code here and show the results ...'... remember that your results wont show until you flush again ....Response.Flush  'this will show everything so far including splash screen AND results

%&gt;</code></pre>
<p>and after we finished from everything we hide the &#8220;splash&#8221; screen with the following command (put the command in javascript script tag)</p>
<pre><code>var splashsplash = document.getElementById("splashScreen");hideObj(splash);</code></pre>
<p>remember that you can customize the splash to your liking, after all its a div and can be pretty flexible.</p>
<div class="blogger-post-footer">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
omandev.net English feed</div>


<p>Related posts:<ol><li><a href='http://www.omandev.net/2008/08/increasing-performance-and-adding-flexibility-using-arrays-instead-of-recordsets-in-asp-with-databases/' rel='bookmark' title='Permanent Link: Increasing performance and adding flexibility using arrays instead of recordsets in ASP with databases'>Increasing performance and adding flexibility using arrays instead of recordsets in ASP with databases</a></li>
<li><a href='http://www.omandev.net/2008/08/calling-asp-functions-from-java-script/' rel='bookmark' title='Permanent Link: Calling ASP Functions from java script'>Calling ASP Functions from java script</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.omandev.net/2008/08/adding-a-friendly-splash-waiting-screen-while-the-code-is-being-executed-in-asp/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Increasing performance and adding flexibility using arrays instead of recordsets in ASP with databases</title>
		<link>http://www.omandev.net/2008/08/increasing-performance-and-adding-flexibility-using-arrays-instead-of-recordsets-in-asp-with-databases/</link>
		<comments>http://www.omandev.net/2008/08/increasing-performance-and-adding-flexibility-using-arrays-instead-of-recordsets-in-asp-with-databases/#comments</comments>
		<pubDate>Thu, 21 Aug 2008 13:24:00 +0000</pubDate>
		<dc:creator>Arkan Hadi</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[ADO]]></category>
		<category><![CDATA[arrays]]></category>
		<category><![CDATA[asp]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[recordset]]></category>
		<category><![CDATA[rs]]></category>
		<category><![CDATA[server-side]]></category>
		<category><![CDATA[vbscript]]></category>

		<guid isPermaLink="false">http://66.147.242.194/~omandevn/wrd1/wordpress/?p=36</guid>
		<description><![CDATA[
  

Those days, inorder to increase the websites/intranets features and interactivity it is essential to have a connectivity to a database wither its an oracle database or MS access or other types of databases, .. and with databases comes the issue of performance, so in this article i would like to share some of [...]


Related posts:<ol><li><a href='http://www.omandev.net/2008/08/adding-a-friendly-splash-waiting-screen-while-the-code-is-being-executed-in-asp/' rel='bookmark' title='Permanent Link: Adding a friendly splash (waiting screen) while the code is being executed in ASP'>Adding a friendly splash (waiting screen) while the code is being executed in ASP</a></li>
<li><a href='http://www.omandev.net/2007/07/sqltip1-search-database-faster-without-like/' rel='bookmark' title='Permanent Link: SQLTip1: search database faster without like'>SQLTip1: search database faster without like</a></li>
<li><a href='http://www.omandev.net/2009/05/sharepoint-list-data-with-sql-server-reporting-services/' rel='bookmark' title='Permanent Link: SharePoint List data with SQL Server Reporting Services'>SharePoint List data with SQL Server Reporting Services</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<link rel="File-List" href="file:///C:%5CDOCUME%7E1%5Cuser%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml"><!--[if gte mso 9]><xml>  <w:worddocument>   <w:view>Normal</w:View>   <w:zoom>0</w:Zoom>   <w:punctuationkerning/>   <w:validateagainstschemas/>   <w:saveifxmlinvalid>false</w:SaveIfXMLInvalid>   <w:ignoremixedcontent>false</w:IgnoreMixedContent>   <w:alwaysshowplaceholdertext>false</w:AlwaysShowPlaceholderText>   <w:compatibility>    <w:breakwrappedtables/>    <w:snaptogridincell/>    <w:wraptextwithpunct/>    <w:useasianbreakrules/>    <w:dontgrowautofit/>   </w:Compatibility>   <w:browserlevel>MicrosoftInternetExplorer4</w:BrowserLevel>  </w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml>  <w:latentstyles deflockedstate="false" latentstylecount="156">  </w:LatentStyles> </xml><![endif]--><br />
<style> <!--  /* Font Definitions */  @font-face 	{font-family:serif; 	panose-1:0 0 0 0 0 0 0 0 0 0; 	mso-font-alt:"Times New Roman"; 	mso-font-charset:0; 	mso-generic-font-family:roman; 	mso-font-format:other; 	mso-font-pitch:auto; 	mso-font-signature:0 0 0 0 0 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-parent:""; 	margin:4.3pt; 	mso-pagination:none; 	mso-hyphenate:none; 	font-size:12.0pt; 	font-family:"Times New Roman"; 	mso-fareast-font-family:"Times New Roman"; 	mso-fareast-language:#00FF;} p.MsoBodyText, li.MsoBodyText, div.MsoBodyText 	{margin-top:4.3pt; 	margin-right:4.3pt; 	margin-bottom:6.0pt; 	margin-left:4.3pt; 	mso-pagination:none; 	mso-hyphenate:none; 	font-size:12.0pt; 	font-family:"Times New Roman"; 	mso-fareast-font-family:"Times New Roman"; 	mso-fareast-language:#00FF;} p.TableContents, li.TableContents, div.TableContents 	{mso-style-name:"Table Contents"; 	mso-style-parent:"Body Text"; 	margin:0cm; 	margin-bottom:.0001pt; 	mso-pagination:none; 	mso-hyphenate:none; 	font-size:12.0pt; 	font-family:"Times New Roman"; 	mso-fareast-font-family:"Times New Roman"; 	mso-fareast-language:#00FF;} @page Section1 	{size:612.0pt 792.0pt; 	margin:1.0cm 1.0cm 1.0cm 2.0cm; 	mso-header-margin:1.0cm; 	mso-footer-margin:1.0cm; 	mso-paper-source:0;} div.Section1 	{page:Section1; 	mso-footnote-position:beneath-text;} --> </style>
<p><!--[if gte mso 10]><br />
<style>  /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Table Normal"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-parent:""; 	mso-padding-alt:0cm 5.4pt 0cm 5.4pt; 	mso-para-margin:0cm; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:"Times New Roman"; 	mso-ansi-language:#0400; 	mso-fareast-language:#0400; 	mso-bidi-language:#0400;} </style>
<p> <![endif]-->
<p class="MsoNormal" style="margin: 0cm 0cm 12pt;"><span style="">Those days</span><span style="border: 1pt none windowtext; padding: 0cm;font-family:serif;" >, inord</span><span style="">er to increase the websites/intranets features and interactivity it is essential to have a connectivity to a database wither its an oracle database or MS access or other types of databases, .. and with databases comes the issue of performance, so in this article i would like to share some of the things that a developer can do t</span><span style="border: 1pt none windowtext; padding: 0cm;font-family:serif;" >o maint</span><span style="">ain a reasonable performance and even adding mor</span><span style="border: 1pt none windowtext; padding: 0cm;font-family:serif;" >e flexibil</span><span style="">ity to the ASP code dealing with databases that has huge data that needs to be fetched.</p>
<p>in this article am usin</span><span style="border: 1pt none windowtext; padding: 0cm;font-family:serif;" >g vbscri</span><span style="">pt as a server-side script.</p>
<p>for convenience i will show the steps on how to connect to MS access database first and after that i will start on the tweaks that developers can do in the coding to enhance performance and adding flexibility <o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0.0001pt;"><b><span style=";font-family:&quot;;font-size:10;"  ><% <o:p></o:p></span></b></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0.0001pt;"><b><span style=";font-family:&quot;;font-size:10;"  >dim conn<br />
<br />set conn=Server.CreateObject(&#8220;ADODB.Connection&#8221;)<br />
<br />conn.Provider=&#8221;Microsoft.Jet.OLEDB.4.0&#8243;<br />
<br />conn.Open &#8220;c:YOUR_DATABASENAME.mdb&#8221; <o:p></o:p></span></b></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0.0001pt;"><b><span style=";font-family:&quot;;font-size:10;"  >%><o:p></o:p></span></b></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0.0001pt;"><span style=""><br />
<br />first of all, after you set up </span><span style="border: 1pt none windowtext; padding: 0cm;font-family:serif;" >a connectivity</span><span style=""> to th</span><span style="border: 1pt none windowtext; padding: 0cm;font-family:serif;" >e databa</span><span style="">se, you create a query, for example:</p>
<p><b><% <o:p></o:p></b></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0.0001pt;"><b><span style="">dim rs &#8216;recored set <o:p></o:p></span></b></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0.0001pt;"><b><span style=";font-family:&quot;;font-size:10;"  >set rs=Server.CreateObject(&#8220;ADODB.recordset&#8221;)<br />
<br />rs.Open &#8220;Select * from TABLE_NAME&#8221;, conn<o:p></o:p></span></b></p>
<p class="TableContents" style="margin-bottom: 0.75pt;"><b><span style="">%></span></b><span style=""></p>
<p>at this point not much can be done, connecting to the database and querying to get data is pretty much fixed.</span></p>
<p class="TableContents" style="margin-bottom: 0.75pt;"><span style="">the thing start when manipulating the data we just fetched, most of the people do is manipulating the data like the following code</p>
<p><b><% <o:p></o:p></b></span></p>
<p class="TableContents" style="margin-bottom: 0.75pt;"><b><span style="">do while not rs.EOF<br />
<br />&#8216; manipulate data here, go through the query exucuted, movenext, movelast move previous, etc</p>
<p>response.write(rs(&#8220;FIELD_NAME&#8221;))<br />
<br />rs.MoveNext<br />
<br />loop<br />
<br />rs.Close<br />
<br />conn.Close<br />
<br />set rs=nothing<br />
<br />set conn=nothing<o:p></o:p></span></b></p>
<p class="TableContents" style="margin-bottom: 0.75pt;"><b><span style=""><span style=""> </span>%><br />
<br /></span></b><span style=""></p>
<p>the above code would work perfectly if you have to deal with one query, relatively small data set in the query,  and only small code is used to manipulate the recordset, and as long as you want to deal with the data (in the above code) th</span><span style="border: 1pt none windowtext; padding: 0cm;font-family:serif;" >e records</span><span style="">et should stay open</span><span style="border: 1pt none windowtext; padding: 0cm;font-family:serif;" ></span><span style=""> .. what if we wanted to do a new query while we are dealing with the existing one while it is still not closed? .. we would have to create another record set and set it and open connection to it, and this would make a nightmare interms of performance if we have a larg data and multiple quieries to deal with. to avoid this we can copy the query information to a multi-dimensional array and close th</span><span style="border: 1pt none windowtext; padding: 0cm;font-family:serif;" >e records</span><span style="">et so we can use it again while we are working with the existing data. instead of doing the previous code we can do the following code:</p>
<p><b><% <o:p></o:p></b></span></p>
<p class="TableContents" style="margin-bottom: 0.75pt;"><b><span style="">dim rsArray</p>
<p>rsArray=rs.getrows()<br />
<br />rs.close<br />
<br />for i=0 to UBound(rsArray,2)-1<br />
<br />&#8216; &#8230;. work with the data here using a multi-dim array, its easier and faster, we can even<br />
<br />&#8216;use another query with the same recordset, ..<br />
<br />&#8216; we can work with the old data and with the new query data without creating new record set</p>
<p>next<br />
<br />conn.Close<br />
<br />set rs=nothing<br />
<br />set conn=nothing <o:p></o:p></span></b></p>
<p class="TableContents" style="margin-bottom: 0.75pt;"><b><span style="">%></span></b><span style=""></p>
<p>after we fetched the information we needed into &#8220;rsArray&#8221; we finished from the record set and we closed it &#8220;rs.close&#8221; so we can use it later while dealing with the existing data without having to create a new recordset. now while we have </span><span style="border: 1pt none windowtext; padding: 0cm;font-family:serif;" >a multi dimensio</span><span style="">nal array in our hand, we can take advantage of that to ou</span><span style="border: 1pt none windowtext; padding: 0cm;font-family:serif;" >r bene</span><span style="">fit, even we ca</span><span style="border: 1pt none windowtext; padding: 0cm;font-family:serif;" >n red</span><span style="">im it if we want to add ne</span><span style="border: 1pt none windowtext; padding: 0cm;font-family:serif;" >w colum</span><span style="">ns or rows, but whe</span><span style="border: 1pt none windowtext; padding: 0cm;font-family:serif;" >n redim-i</span><span style="">ng the data is lost, so we have to use &#8220;preserve&#8221; keyword to preserve the data after rediming, for example if we have number of rows and we want to add a new one we do the following code<br />
<br /><b><br />
<br /><%</b></span></p>
<p class="TableContents" style="margin-bottom: 0.75pt;">.</p>
<p class="TableContents" style="margin-bottom: 0.75pt;">.</p>
<p class="TableContents" style="margin-bottom: 0.75pt;">.<br />
<br /><span style=""><b><o:p></o:p></b></span></p>
<p class="TableContents" style="margin-bottom: 0.75pt;"><b><span style="">dim cols</p>
<p>dim rows</p>
<p>cols = UBound(rsArray,1) +1</p>
<p>rows = UBound(rsArray,2) +1</p>
<p>redim preserve rsArray(cols,rows+1)  &#8216; we have extra row<br />
<br />%><br />
<br /></span></b><span style=""></p>
<p>notice the preserve keyword only works whe</span><span style="border: 1pt none windowtext; padding: 0cm;font-family:serif;" >n redim-i</span><span style="">ng the las</span><span style="border: 1pt none windowtext; padding: 0cm;font-family:serif;" >t dimension</span><span style="">, if we want to redim the first one (or the second one or third if we have more then 2) we have to go around it, copying the array to another array and put the dimension we want to change in the last place, and then we can use the &#8220;redim preserve&#8221; and work with the temp. array.</p>
<p>As a conclusion, </span><span style="">using the actual record sets while manipulating data and creating new ones whenever we need is not efficient, on the other hand </span><span style="">knowing the features of the arrays we can use it to our advantage so dealing with arrays is more flexible and more efficient then the actual record set.</span><span style="font-family:Arial;"><o:p></o:p></span></p>
<div class="blogger-post-footer">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
omandev.net English feed</div>


<p>Related posts:<ol><li><a href='http://www.omandev.net/2008/08/adding-a-friendly-splash-waiting-screen-while-the-code-is-being-executed-in-asp/' rel='bookmark' title='Permanent Link: Adding a friendly splash (waiting screen) while the code is being executed in ASP'>Adding a friendly splash (waiting screen) while the code is being executed in ASP</a></li>
<li><a href='http://www.omandev.net/2007/07/sqltip1-search-database-faster-without-like/' rel='bookmark' title='Permanent Link: SQLTip1: search database faster without like'>SQLTip1: search database faster without like</a></li>
<li><a href='http://www.omandev.net/2009/05/sharepoint-list-data-with-sql-server-reporting-services/' rel='bookmark' title='Permanent Link: SharePoint List data with SQL Server Reporting Services'>SharePoint List data with SQL Server Reporting Services</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.omandev.net/2008/08/increasing-performance-and-adding-flexibility-using-arrays-instead-of-recordsets-in-asp-with-databases/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Calling ASP Functions from java script</title>
		<link>http://www.omandev.net/2008/08/calling-asp-functions-from-java-script/</link>
		<comments>http://www.omandev.net/2008/08/calling-asp-functions-from-java-script/#comments</comments>
		<pubDate>Thu, 07 Aug 2008 20:49:00 +0000</pubDate>
		<dc:creator>Ali AL Lawati</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[NET]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://66.147.242.194/~omandevn/wrd1/wordpress/?p=35</guid>
		<description><![CDATA[Umm i think some may get confused that isn&#8217;t it that Ajax can call server side functions from JavaScript ?? ! well thats write but i want to talk about those people who are still using Microsoft .NET 2005 and not lucky enough to get gaya or other ajax plug-in from Microsoft, or those who [...]


Related posts:<ol><li><a href='http://www.omandev.net/2008/08/adding-a-friendly-splash-waiting-screen-while-the-code-is-being-executed-in-asp/' rel='bookmark' title='Permanent Link: Adding a friendly splash (waiting screen) while the code is being executed in ASP'>Adding a friendly splash (waiting screen) while the code is being executed in ASP</a></li>
<li><a href='http://www.omandev.net/2007/10/jcodebase-1-1-beta/' rel='bookmark' title='Permanent Link: JCodeBase 1.1 Beta'>JCodeBase 1.1 Beta</a></li>
<li><a href='http://www.omandev.net/2008/09/javascript-the-language-for-them-all-jquery-with-gridview-in-asp-net-2-0/' rel='bookmark' title='Permanent Link: JavaScript, the language for them all!! (Jquery with gridview in asp.net 2.0)'>JavaScript, the language for them all!! (Jquery with gridview in asp.net 2.0)</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Umm i think some may get confused that isn&#8217;t it that <a href="http://en.wikipedia.org/wiki/Ajax_%28programming%29" title="Ajax (programming)" rel="wikipedia" target="_blank" class="zem_slink">Ajax</a> can call server side functions from JavaScript ?? ! well thats write but i want to talk about those people who are still using <a href="http://www.microsoft.com/" title="Microsoft" rel="homepage" target="_blank" class="zem_slink">Microsoft</a> .NET 2005 and not lucky enough to get gaya or other ajax plug-in from Microsoft, or those who are still not ready to deal with Ajax and other Ajax/<a href="http://en.wikipedia.org/wiki/JavaScript" title="JavaScript" rel="wikipedia" target="_blank" class="zem_slink">JavaScript</a> plug ins such as jquery .</p>
<p>Most of the old .NET developer are used to have their <a href="http://en.wikipedia.org/wiki/Web_application" title="Web application" rel="wikipedia" target="_blank" class="zem_slink">web applications</a> deal with post-backs but very few of them really knows how these post-backs do work. well most of the things in .NET application are done depending on  client side script (JavaScript).</p>
<p>For that when you have a good amount of JavaScript controlling your application you need to know how to make that JavaScript call an asp function.</p>
<p>Before explaining how to do this first lets see why do we need it ? Well may be you will need to do something with JavaScript before calling server side codes, like validating entered data ( well i know that is a very bad example since in .NET there is a ready validating controles) a better example lets say you have created a web page that allow users to draw for example mind maps, or charts, or mouse gestures so that when user drag his mouse in a specific way there will be a specific response from your web application.</p>
<p>well in all of these examples JavaScript or JavaScript frameworks like jquery  will be doing most of the things in the application here the decision to make a server side function call should be given to java script code.</p>
<p>Calling asp.NET function by JavaScript you need to do a simple trick,</p>
<p>Well as i found from some of my tries to  get there, that you can not do it having normal form buttons you will need at least one &#8220;link button&#8221; (sure you can hide it, but NEVER make visible = false because it will be removed from the HTML code; instead apply <a href="http://en.wikipedia.org/wiki/Cascading_Style_Sheets" title="Cascading Style Sheets" rel="wikipedia" target="_blank" class="zem_slink">CSS</a> style on it that make it hidden)</p>
<p><span style="color: rgb(255, 0, 0);">visibility</span>:<span style="color: rgb(51, 102, 255);">hidden</span>;</p>
<p>then you need to call the post back function that usually is called if you really do click that link_button and in the asp.NET code do call your asp function in the link_button event handler function.</p>
<p>well thats a lot of blah blah, theoretical talks, well then lets get into action then.</p>
<p>here i will show a very simple example (sorry i am out of creativity by now so the example will be very simple) i created a very simple page with a text box an a link button</p>
<p><textarea rows="10" cols="40"><br />
<form id="form1" runat="server">>
<div>      <asp:textbox id="TextBox1" runat="server"></asp:textbox>  </div>
<p>     <asp:linkbutton style="font-weight: bold;">CssClass=&#8221;hdn&#8221; ID=&#8221;LinkButton1&#8243; runat=&#8221;server&#8221;         onclick=&#8221;LinkButton1_Click&#8221;>LinkButton</asp:linkbutton> </p>
</p></form>
<p></textarea></p>
<p>i added a very simple response code to the link button click event in C#<br /><textarea rows="5" cols="40">  protected void LinkButton1_Click(object sender, EventArgs e)  {  Response.Write(&#8220;yooohooo&#8221;);  }</textarea><br />well yeah this is our server side function (i told you this week i am out of creativity).</p>
<p>and then i added they style to hide the link button<br /><textarea rows="4" cols="40"><br />
<style>    .hdn{ visibility:hidden;    }    </style>
<p></textarea><br />now even in the IDE you just cannot see the link button</p>
<p>now the real thing is in the java script i have done a very simple and a very boring thing witch is on each button press it makes the text in the text box uppercase and if the length of text reaches to 6 it will call the server side function</p>
<p>i have added it just before the end of form tag</p>
<p><textarea rows="20" cols="40">     <script type="text/javascript">    var t =document.getElementById("TextBox1");          // well you can imagen this function is any thing else may be figuring out how did you made your mouse gesture     document.getElementById("TextBox1").onkeydown = function ss(){        t.value= t.value.toUpperCase();            // may be here there is a condition to know if it should call the server side function       if(t.value.length >5)      {   __doPostBack('LinkButton1','');        }        }    </script></textarea><br />well you can see the real point is in the function  __doPostBack(&#8221;,&#8221;)<br />which is created by Visual Studio it self you do not have to program it and it can call server side functions by its own way (well what you do not know that there are a lot of hidden fields in your page that are getting created by visual studio and are used for these kind of stuff)</p>
<p>and the reason i say that we must have a link button is that i found Visual studio do not create this JavaScript function __doPostBack(&#8221;,&#8221;)  if we dont have link button</p>
<p>well thats all for today i think hope this thing (which i had to search and try a lot of things to be able to do) will help you in your projects
<div class="blogger-post-footer">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
omandev.net English feed</div>


<p>Related posts:<ol><li><a href='http://www.omandev.net/2008/08/adding-a-friendly-splash-waiting-screen-while-the-code-is-being-executed-in-asp/' rel='bookmark' title='Permanent Link: Adding a friendly splash (waiting screen) while the code is being executed in ASP'>Adding a friendly splash (waiting screen) while the code is being executed in ASP</a></li>
<li><a href='http://www.omandev.net/2007/10/jcodebase-1-1-beta/' rel='bookmark' title='Permanent Link: JCodeBase 1.1 Beta'>JCodeBase 1.1 Beta</a></li>
<li><a href='http://www.omandev.net/2008/09/javascript-the-language-for-them-all-jquery-with-gridview-in-asp-net-2-0/' rel='bookmark' title='Permanent Link: JavaScript, the language for them all!! (Jquery with gridview in asp.net 2.0)'>JavaScript, the language for them all!! (Jquery with gridview in asp.net 2.0)</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.omandev.net/2008/08/calling-asp-functions-from-java-script/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
