<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" version="2.0">

<channel>
	<title>Me.Thoughts.ToString()</title>
	
	<link>http://www.kikosantos.net/tech</link>
	<description>Programming, .Net, SuiteScript</description>
	<pubDate>Wed, 13 Jan 2010 09:46:59 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7-RC2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/MeThoughtsToString" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="methoughtstostring" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>SuiteScript: Inventory Transfer via Code</title>
		<link>http://www.kikosantos.net/tech/2010/01/suitescript-inventory-transfer-via-code/</link>
		<comments>http://www.kikosantos.net/tech/2010/01/suitescript-inventory-transfer-via-code/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 09:43:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[netsuite]]></category>

		<guid isPermaLink="false">http://www.kikosantos.net/tech/?p=129</guid>
		<description><![CDATA[




Pre 2009.2, transferring inventory quantity from one location to another via SuiteScript can only be done through inventoryadjustment. First you have to add quantity to destination location.
xfer.setLineItemValue&#40;&#34;inventory&#34;, &#34;item&#34;, 1, ITEM_ID&#41;;
xfer.setLineItemValue&#40;&#34;inventory&#34;, &#34;location&#34;, 1, LOC_DESTINATION&#41;;
xfer.setLineItemValue&#40;&#34;inventory&#34;, &#34;adjustqtyby&#34;, 1, &#34;5&#34;&#41;;
Then you have to deduct the quantity from the origin location
xfer.setLineItemValue&#40;&#34;inventory&#34;, &#34;item&#34;, 2, ITEM_ID&#41;;
xfer.setLineItemValue&#40;&#34;inventory&#34;, &#34;location&#34;, 2, LOC_ORIGIN&#41;;
xfer.setLineItemValue&#40;&#34;inventory&#34;, &#34;adjustqtyby&#34;, 2, &#34;-5&#34;&#41;;
Putting [...]]]></description>
			<content:encoded><![CDATA[<!-- Easy AdSense V2.82 -->
<!-- Post[count: 3] -->
<div class="ezAdsense adsense adsense-leadin" style="float:left;margin:12px;"><script type="text/javascript"><!--
google_ad_client = "pub-1011011685108095";
/* 200x200, created 5/18/08 */
google_ad_slot = "1285650675";
google_ad_width = 200;
google_ad_height = 200;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div><p>Pre 2009.2, transferring inventory quantity from one location to another via SuiteScript can only be done through <em>inventoryadjustment</em>. First you have to add quantity to destination location.</p>
<div class="dean_ch" style="white-space: wrap;">xfer.<span class="me1">setLineItemValue</span><span class="br0">&#40;</span><span class="st0">&quot;inventory&quot;</span>, <span class="st0">&quot;item&quot;</span>, <span class="nu0">1</span>, ITEM_ID<span class="br0">&#41;</span>;<br />
xfer.<span class="me1">setLineItemValue</span><span class="br0">&#40;</span><span class="st0">&quot;inventory&quot;</span>, <span class="st0">&quot;location&quot;</span>, <span class="nu0">1</span>, LOC_DESTINATION<span class="br0">&#41;</span>;<br />
xfer.<span class="me1">setLineItemValue</span><span class="br0">&#40;</span><span class="st0">&quot;inventory&quot;</span>, <span class="st0">&quot;adjustqtyby&quot;</span>, <span class="nu0">1</span>, <span class="st0">&quot;5&quot;</span><span class="br0">&#41;</span>;</div>
<p>Then you have to deduct the quantity from the origin location</p>
<div class="dean_ch" style="white-space: wrap;">xfer.<span class="me1">setLineItemValue</span><span class="br0">&#40;</span><span class="st0">&quot;inventory&quot;</span>, <span class="st0">&quot;item&quot;</span>, <span class="nu0">2</span>, ITEM_ID<span class="br0">&#41;</span>;<br />
xfer.<span class="me1">setLineItemValue</span><span class="br0">&#40;</span><span class="st0">&quot;inventory&quot;</span>, <span class="st0">&quot;location&quot;</span>, <span class="nu0">2</span>, LOC_ORIGIN<span class="br0">&#41;</span>;<br />
xfer.<span class="me1">setLineItemValue</span><span class="br0">&#40;</span><span class="st0">&quot;inventory&quot;</span>, <span class="st0">&quot;adjustqtyby&quot;</span>, <span class="nu0">2</span>, <span class="st0">&quot;-5&quot;</span><span class="br0">&#41;</span>;</div>
<p>Putting it all together, the code will roughly look like this:</p>
<p><span id="more-129"></span></p>
<div class="dean_ch" style="white-space: wrap;"><span class="kw2">var</span> xfer = nlapiCreateRecord<span class="br0">&#40;</span><span class="st0">&quot;inventoryadjustment&quot;</span><span class="br0">&#41;</span>;<br />
xfer.<span class="me1">setFieldValue</span><span class="br0">&#40;</span><span class="st0">&quot;account&quot;</span>, SAMPLE_ACCOUNT<span class="br0">&#41;</span>;</p>
<p><span class="co1">// add qty to destination</span><br />
xfer.<span class="me1">setLineItemValue</span><span class="br0">&#40;</span><span class="st0">&quot;inventory&quot;</span>, <span class="st0">&quot;item&quot;</span>, <span class="nu0">1</span>, ITEM_ID<span class="br0">&#41;</span>;<br />
xfer.<span class="me1">setLineItemValue</span><span class="br0">&#40;</span><span class="st0">&quot;inventory&quot;</span>, <span class="st0">&quot;location&quot;</span>, <span class="nu0">1</span>, LOC_DESTINATION<span class="br0">&#41;</span>;<br />
xfer.<span class="me1">setLineItemValue</span><span class="br0">&#40;</span><span class="st0">&quot;inventory&quot;</span>, <span class="st0">&quot;adjustqtyby&quot;</span>, <span class="nu0">1</span>, <span class="st0">&quot;5&quot;</span><span class="br0">&#41;</span>;</p>
<p><span class="co1">// deduct qty from origin</span><br />
xfer.<span class="me1">setLineItemValue</span><span class="br0">&#40;</span><span class="st0">&quot;inventory&quot;</span>, <span class="st0">&quot;item&quot;</span>, <span class="nu0">2</span>, ITEM_ID<span class="br0">&#41;</span>;<br />
xfer.<span class="me1">setLineItemValue</span><span class="br0">&#40;</span><span class="st0">&quot;inventory&quot;</span>, <span class="st0">&quot;location&quot;</span>, <span class="nu0">2</span>, LOC_ORIGIN<span class="br0">&#41;</span>;<br />
xfer.<span class="me1">setLineItemValue</span><span class="br0">&#40;</span><span class="st0">&quot;inventory&quot;</span>, <span class="st0">&quot;adjustqtyby&quot;</span>, <span class="nu0">2</span>, <span class="st0">&quot;-5&quot;</span><span class="br0">&#41;</span>;</p>
<p><span class="kw2">var</span> id = nlapiSubmitRecord<span class="br0">&#40;</span>xfer, <span class="kw2">true</span><span class="br0">&#41;</span>;</div>
<p>With the 2009.2 update, users can directly create an <em>inventorytransfer</em> record. They just need to specify the origin (location) and the destination (tolocation) and NetSuite implicitly add the quantity specified to the destination and deduct the quantity from the origin.</p>
<div class="dean_ch" style="white-space: wrap;"><span class="kw2">var</span> xfer = nlapiCreateRecord<span class="br0">&#40;</span><span class="st0">&quot;inventorytransfer&quot;</span><span class="br0">&#41;</span>;</p>
<p>xfer.<span class="me1">setFieldValue</span><span class="br0">&#40;</span><span class="st0">&quot;subsidiary&quot;</span>, SUBSIDIARY_ID<span class="br0">&#41;</span>;<br />
xfer.<span class="me1">setFieldValue</span><span class="br0">&#40;</span><span class="st0">&quot;account&quot;</span>, SAMPLE_ACCOUNT<span class="br0">&#41;</span>;<br />
xfer.<span class="me1">setFieldValue</span><span class="br0">&#40;</span><span class="st0">&quot;memo&quot;</span>, <span class="st0">&quot;Sample Inventory Transfer&quot;</span><span class="br0">&#41;</span>;</p>
<p>xfer.<span class="me1">setFieldValue</span><span class="br0">&#40;</span><span class="st0">&quot;location&quot;</span>, LOC_ORIGIN<span class="br0">&#41;</span>;<br />
xfer.<span class="me1">setFieldValue</span><span class="br0">&#40;</span><span class="st0">&quot;tolocation&quot;</span>, LOC_DESTINATION<span class="br0">&#41;</span>;<br />
xfer.<span class="me1">setLineItemValue</span><span class="br0">&#40;</span><span class="st0">&quot;invt&quot;</span>,<span class="st0">&quot;invtid&quot;</span>,<span class="nu0">1</span>, ITEM_ID<span class="br0">&#41;</span>;<br />
xfer.<span class="me1">setLineItemValue</span><span class="br0">&#40;</span><span class="st0">&quot;invt&quot;</span>,<span class="st0">&quot;adjustqtyby&quot;</span>, <span class="nu0">1</span>, <span class="st0">&quot;5&quot;</span><span class="br0">&#41;</span>;</p>
<p><span class="kw2">var</span> id = nlapiSubmitRecord<span class="br0">&#40;</span>xfer<span class="br0">&#41;</span>;</div>
<p>Pretty neat!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kikosantos.net/tech/2010/01/suitescript-inventory-transfer-via-code/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Show Field’s Internal ID</title>
		<link>http://www.kikosantos.net/tech/2009/11/show-fields-internal-id/</link>
		<comments>http://www.kikosantos.net/tech/2009/11/show-fields-internal-id/#comments</comments>
		<pubDate>Wed, 04 Nov 2009 19:23:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[netsuite]]></category>

		<category><![CDATA[configuration]]></category>

		<guid isPermaLink="false">http://www.kikosantos.net/tech/?p=112</guid>
		<description><![CDATA[NetSuite&#8217;s Field Help is a small pop-up window that displays a brief description of the field associated to it. To open it, simply click the field label.

But do you know that the Field Help can also display the field&#8217;s Internal Id? What is this for? For SuiteScript developer, this is god sent. One doesn&#8217;t need [...]]]></description>
			<content:encoded><![CDATA[<p>NetSuite&#8217;s Field Help is a small pop-up window that displays a brief description of the field associated to it. To open it, simply click the field label.</p>
<p style="text-align: center;"><a title="internal-id-01 by Kiko Santos, on Flickr" href="http://www.flickr.com/photos/senselessfeats/4075183197/"><img class="aligncenter" src="http://farm3.static.flickr.com/2600/4075183197_bfcb918447_o.png" alt="internal-id-01" width="439" height="260" /></a></p>
<p><span id="more-112"></span>But do you know that the Field Help can also display the field&#8217;s Internal Id? What is this for? For SuiteScript developer, this is god sent. One doesn&#8217;t need to go to the field configuration page to know the field&#8217;s Internal Id, he can just open the Field Help window to view this.</p>
<p>To make the Internal Id is the Field Help window visible, go to Home &gt;&gt; Set Preferences. Under the Defaults section, tick the &#8220;Show Internal IDs&#8221; checkbox then click the Save button.</p>
<p style="text-align: center;"><a title="internal-id-02 by Kiko Santos, on Flickr" href="http://www.flickr.com/photos/senselessfeats/4075183201/"><img class="aligncenter" src="http://farm3.static.flickr.com/2780/4075183201_121af6db74_o.png" alt="internal-id-02" width="474" height="170" /></a></p>
<p>That&#8217;s it! You can now view the field&#8217;s Internal Id in the Field Help window.</p>
<p style="text-align: center;"><a title="internal-id-03 by Kiko Santos, on Flickr" href="http://www.flickr.com/photos/senselessfeats/4075183203/"><img class="aligncenter" src="http://farm4.static.flickr.com/3500/4075183203_f2618b0779_o.png" alt="internal-id-03" width="383" height="202" /></a></p>
<p>Great things really do come in small packages.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kikosantos.net/tech/2009/11/show-fields-internal-id/feed/</wfw:commentRss>
		</item>
		<item>
		<title>New Implementation of nlapiStringToDate in 2009.2</title>
		<link>http://www.kikosantos.net/tech/2009/10/new-implementation-of-nlapistringtodate-in-20092/</link>
		<comments>http://www.kikosantos.net/tech/2009/10/new-implementation-of-nlapistringtodate-in-20092/#comments</comments>
		<pubDate>Thu, 29 Oct 2009 18:02:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[netsuite]]></category>

		<category><![CDATA[error]]></category>

		<category><![CDATA[suitescript]]></category>

		<guid isPermaLink="false">http://www.kikosantos.net/tech/?p=108</guid>
		<description><![CDATA[All of a sudden, our users complained that one of our NetSuite process failed. They reported this error:
TypeError: Cannot call method &#8220;getTime&#8221; of null (some_code.js$sys#791)
I tried to debug the code using nlapiLogExecution can still couldn&#8217;t locate where the error occured. I up the ante by using the script debugger and found that the error happens [...]]]></description>
			<content:encoded><![CDATA[<p>All of a sudden, our users complained that one of our <a href="http://www.netsuite.com" target="_blank">NetSuite</a> process failed. They reported this error:</p>
<p>TypeError: Cannot call method &#8220;getTime&#8221; of null (some_code.js$sys#791)</p>
<p>I tried to debug the code using nlapiLogExecution can still couldn&#8217;t locate where the error occured. I up the ante by using the script debugger and found that the error happens because the code is trying to call the getTime of a null object. Pretty self explanatory, but why did it happen? The code roughly looks like this:</p>
<div class="dean_ch" style="white-space: wrap;"><span class="kw2">var</span> billDateStr = rec.<span class="me1">getFieldValue</span><span class="br0">&#40;</span><span class="st0">&quot;custrecord_billdate&quot;</span><span class="br0">&#41;</span><br />
<span class="kw2">var</span> billDate = nlapiStringToDate<span class="br0">&#40;</span>billDateStr<span class="br0">&#41;</span>;<br />
<span class="kw2">var</span> billTime = billDate.<span class="me1">getTime</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
<p><span id="more-108"></span>This used to work fine. Notice that I didn&#8217;t test my billDateStr if it&#8217;s empty because I know that nlapiStringToDate will return the current date in case the date string that I passed is null or empty. NetSuite&#8217;s 2009.2 release handles this differently. Searching for answers in their help page, I found this article inside their release note:</p>
<blockquote><p>Starting with 2009.2, passing an empty string to the nlapiStringToDate(str) function returns null. Prior to this release, passing an empty string returned the current date. For example, in this snippet, the value of emptydate used to be the current date; now it is null.</p>
<div class="dean_ch" style="white-space: wrap;"><span class="kw2">var</span> emptydate = nlapiStringToDate<span class="br0">&#40;</span><span class="st0">&#8221;</span><span class="br0">&#41;</span>;<br />
nlapiLogExecution<span class="br0">&#40;</span><span class="st0">&#8216;DEBUG&#8217;</span>, <span class="st0">&#8216;emptydate&#8217;</span>, emptydate<span class="br0">&#41;</span>;</div>
</blockquote>
<p>I wonder why they changed the implementation of nlapiStringToDate. Nevertheless, now I learned my lesson. Reading the release notes has its benefits.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kikosantos.net/tech/2009/10/new-implementation-of-nlapistringtodate-in-20092/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Document Outline for Client Script in Visual Studio 2005</title>
		<link>http://www.kikosantos.net/tech/2008/10/document-outline-for-client-script-in-visual-studio-2005/</link>
		<comments>http://www.kikosantos.net/tech/2008/10/document-outline-for-client-script-in-visual-studio-2005/#comments</comments>
		<pubDate>Thu, 09 Oct 2008 20:39:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://www.kiko-santos.com/?p=19</guid>
		<description><![CDATA[One feature I like most in Visual Studio 2003 is their Document Outline Panel. I usually abuse this feature on my JavaScript code to easily see and jump through my functions.

Though the Document Outline Panel is also included in Visual Studio 2005, it now doesn&#8217;t support outlining for JavaScript code.

Good thing Evgeny Kleiman created an [...]]]></description>
			<content:encoded><![CDATA[<p>One feature I like most in Visual Studio 2003 is their Document Outline Panel. I usually abuse this feature on my JavaScript code to easily see and jump through my functions.</p>
<p><img src="http://farm4.static.flickr.com/3130/2926882630_a2115f47bd.jpg" alt="" width="500" height="338" /></p>
<p><span id="more-19"></span>Though the Document Outline Panel is also included in Visual Studio 2005, it now doesn&#8217;t support outlining for JavaScript code.</p>
<p><img src="http://farm4.static.flickr.com/3181/2926030443_c87aceb682.jpg" alt="" width="500" height="336" /></p>
<p>Good thing Evgeny Kleiman created an add-in for VS2005 that creates a treeview structure of the client script that is currently loaded in VS&#8217;s IDE much like the in VS2003. You can found this in the <a href="http://tech.groups.yahoo.com/group/vsnetaddin/message/3748" target="_blank">Visual Studio .Net Add-Ins Group at Yahoo! Groups</a>.  The file also contains the add-in&#8217;s source code but for those who just want the add-in file, you can <a href="http://www.fileden.com/files/2008/10/9/2135731/ScriptOutline.zip">download it here</a>.</p>
<p>Installation is straightforward.</p>
<p>1. Copy the <em>ScriptOutline.AddIn</em> and <em>ScriptOutline.dll</em> files in the addin folder of Visual Studio 2005</p>
<ul>
<li>For XP users:<br />
C:Documents and Settings&lt;username&gt;My DocumentsVisual Studio 2005Addins</li>
<li> For Vista users:<br />
C:Users&lt;username&gt;DocumentsVisual Studio 2005Addins</li>
</ul>
<p>2. Open Visual Studio 2005 then on the menu go to Tools &gt; Add-in Manager…</p>
<p><img src="http://farm4.static.flickr.com/3067/2926030493_1d36d4518a_m.jpg" alt="" width="240" height="184" /></p>
<p>3. Check the ScriptOutline Checkbox then click OK.</p>
<p><img src="http://farm4.static.flickr.com/3237/2926030525_a9ca622b86.jpg" alt="" width="500" height="324" /></p>
<p>4. The ScriptOutline panel will open. This panel, like any other panel, can be docked on any sides of the IDE.</p>
<p><img src="http://farm4.static.flickr.com/3285/2926882866_e931812bcd.jpg" alt="" width="500" height="380" /></p>
<p>Happy scripting!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kikosantos.net/tech/2008/10/document-outline-for-client-script-in-visual-studio-2005/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Import Yahoo! 360 Blog To WordPress</title>
		<link>http://www.kikosantos.net/tech/2008/06/import-yahoo-360-blog-to-wordpress/</link>
		<comments>http://www.kikosantos.net/tech/2008/06/import-yahoo-360-blog-to-wordpress/#comments</comments>
		<pubDate>Wed, 18 Jun 2008 11:41:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://www.kiko-santos.com/?p=17</guid>
		<description><![CDATA[Before having my own domain for my blog, I was a huge fan of Yahoo! 360. I love its simplicity and its integration with other Yahoo services. But my enthusiasm slowly faded since Yahoo decides to pull the plug on Y360. Then I found WordPress and I fell in love again. Now my major problem [...]]]></description>
			<content:encoded><![CDATA[<p>Before having my own domain for my blog, I was a huge fan of <a href="http://360.yahoo.com">Yahoo! 360</a>. I love its simplicity and its integration with other Yahoo services. But my enthusiasm slowly faded since Yahoo decides to pull the plug on Y360. Then I found <a href="http://www.wordpress.com">WordPress</a> and I fell in love again. Now my major problem is how do I migrate all my Y360 entries into WP? The most obvious solution is to manually copy all my Y360 entries and paste it to WP one by one. If your post has comments and tags, you should do the same if you want it completely &#8220;save&#8221; the entry. But what if you have over 50 entries in Y360 with more than 20 comments each? What a nightmare.<br />
<span id="more-17"></span></p>
<p>I tried searching the web for a quick solution to this migration problem. Some suggested to import the rss feed of Y360 to WP. Unfortunately, Y360 feed only covers the last 10 posts of your blog and comments are not included in the feed as well. I hate to see all my Y360 posts go into waste so I decided on creating my own Y360 to WordPress tool a shot.</p>
<p>My plan is to leech the title, entry content, published date, tags and comments and their dates in the Y360 html page itself. Since I don&#8217;t have my own web hosting that supports ASP.Net [ donations are welcome <img src='http://www.kikosantos.net/tech/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> ] I decided to make it a standalone Window App. As it turns out, the .Net framework doesn&#8217;t have a built-in HTML parser. I searched the web and came across <a href="http://www.codeplex.com/htmlagilitypack/">HtmlAgilityPack</a>. This is an open-source HTML Parser created in C# which promises to be an agile HTML parser that builds a read/write DOM and supports plain XPATH or XSLT.</p>
<p>Capabilities:</p>
<ul>
<li>Converts a Yahoo! 360 blog to a single xml file and can be imported in a WordPress powered blog.</li>
<li>Aside from the entry title, entry date and entry content, this app can extract entry tags and comments (comment date, author, content)</li>
<li>Preserves the old formatting the 360 content</li>
<li>Maintains the images attached inside the blog entry.</li>
<li>Auto conversion of 360 dates to WP dates</li>
<li>Supports HTTP proxy server and domain name authentications</li>
</ul>
<p>Limitations</p>
<ul>
<li>Main image of the 360 blog entry (located the top of the entry just below the title) will not be included.</li>
<li>Can extract only the first 50 comments of an entry. Y360 paginates comments by groups of 50. Since the app only leeches the front page of an entry, comments located inside the next page are not included.</li>
<li>Slow extraction especially for blog with more than 50 entries. I tested it on my own Y360 blog with 25 entries and 112 comments and the whole process was completed in 3 minutes and 52 seconds</li>
</ul>
<p>As of this posting, I will only release the setup files. This will be sufficient for you to install the app in your machine. I am planning to also release the source code after I tidy up my codes a bit.</p>
<p>Go to my<a href="http://www.codeplex.com/y360towordpress/Release/ProjectReleases.aspx?ReleaseId=14480"> Y360 To WordPress page in codeplex to download the beta release</a>. The installation note and how to use the app are also located there. Feel free to post a comment for your feedback and suggestions regarding the app.</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kikosantos.net/tech/2008/06/import-yahoo-360-blog-to-wordpress/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Querying the Latest Record</title>
		<link>http://www.kikosantos.net/tech/2008/05/querying-the-latest-record/</link>
		<comments>http://www.kikosantos.net/tech/2008/05/querying-the-latest-record/#comments</comments>
		<pubDate>Fri, 23 May 2008 15:58:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://www.kiko-santos.com/?p=15</guid>
		<description><![CDATA[It was my long standing problem when querying the latest history of a record. The scenario is that I have a parent table and its transaction log (say, history records) are stored in a child table linked by the parent&#8217;s primary key id. The parent table stores the main information regarding a transaction while the [...]]]></description>
			<content:encoded><![CDATA[<p>It was my long standing problem when querying the latest history of a record. The scenario is that I have a parent table and its transaction log (say, history records) are stored in a child table linked by the parent&#8217;s primary key id. The parent table stores the main information regarding a transaction while the child table stores historical data of what happened in the parent&#8217;s table info.</p>
<p style="center;"><img class="aligncenter" src="http://i72.photobucket.com/albums/i168/senselessfeats/tech/parent-children.gif" alt="parent-child relationship" width="432" height="172" /></p>
<p><span id="more-15"></span>Well, the first thing that I can think of was to create a sub-query of my child table, MAX it&#8217;s identity and GROUP BY the parent&#8217;s id.</p>
<div class="dean_ch" style="white-space: wrap;">
<span class="kw1">SELECT</span> &nbsp; &nbsp; &nbsp;p.<span class="me1">*</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; , &nbsp; c.<span class="me1">details</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; , &nbsp; c.<span class="me1">date_created</span><br />
<span class="kw1">FROM</span> &nbsp; &nbsp; &nbsp; &nbsp;<span class="br0">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">SELECT</span> &nbsp; &nbsp; &nbsp;tmp.<span class="me1">*</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; , &nbsp; c.<span class="me1">details</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">FROM</span> &nbsp; &nbsp; &nbsp; &nbsp;<span class="br0">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">SELECT</span> &nbsp; &nbsp; &nbsp;parent_id<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; , &nbsp; <span class="kw2">MAX</span><span class="br0">&#40;</span>date_created<span class="br0">&#41;</span> date_created<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">FROM</span> &nbsp; &nbsp; &nbsp; &nbsp;children<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">GROUP</span> <span class="kw1">BY</span> &nbsp; &nbsp;parent_id<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#41;</span> tmp<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">INNER</span> join &nbsp;children c<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">ON</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;tmp.<span class="me1">parent_id</span> = c.<span class="me1">parent_id</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; and &nbsp; &nbsp; &nbsp; &nbsp; tmp.<span class="me1">date_created</span> = c.<span class="me1">date_created</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#41;</span> c<br />
<span class="kw1">INNER</span> join &nbsp;parent p<br />
<span class="kw1">ON</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;c.<span class="me1">parent_id</span> = p.<span class="me1">id</span></div>
<p>Though I am getting my desired result set, the code below is more efficient.</p>
<div class="dean_ch" style="white-space: wrap;"><span class="kw1">SELECT</span> &nbsp; &nbsp; &nbsp;p.<span class="me1">*</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; , &nbsp; c.<span class="me1">details</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; , &nbsp; c.<span class="me1">date_created</span><br />
<span class="kw1">FROM</span> &nbsp; &nbsp; &nbsp; &nbsp;parent p<br />
<span class="kw1">INNER</span> join &nbsp;children c<br />
<span class="kw1">ON</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;p.<span class="me1">id</span> = c.<span class="me1">parent_id</span><br />
<span class="kw1">WHERE</span> &nbsp; &nbsp; &nbsp; c.<span class="me1">id</span> =<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">SELECT</span> &nbsp; &nbsp; &nbsp;<span class="kw2">MAX</span><span class="br0">&#40;</span>c2.<span class="me1">id</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">FROM</span> &nbsp; &nbsp; &nbsp; &nbsp;children c2<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">WHERE</span> &nbsp; &nbsp; &nbsp; c2.<span class="me1">parent_id</span> = p.<span class="me1">id</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">GROUP</span> <span class="kw1">BY</span> &nbsp; &nbsp;parent_id<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#41;</span></div>
<p>Why didn&#8217;t I think of this one first? Classic example of <a href="http://www.apples4theteacher.com/holidays/columbus-day/short-stories/columbus-and-the-egg.html">Columbus&#8217; Egg</a>. Again, there is always a simple solution behind a <del datetime="00">complex</del> problem.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kikosantos.net/tech/2008/05/querying-the-latest-record/feed/</wfw:commentRss>
		</item>
		<item>
		<title>PHP: Cannot Modify Header Information</title>
		<link>http://www.kikosantos.net/tech/2008/05/php-cannot-modify-header-information/</link>
		<comments>http://www.kikosantos.net/tech/2008/05/php-cannot-modify-header-information/#comments</comments>
		<pubDate>Mon, 19 May 2008 03:28:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.kiko-santos.com/?p=14</guid>
		<description><![CDATA[I downloaded a very cool theme for this blog and luckily, I successfully installed it in my local instance of WordPress. Satisfying the OC in me, I immediately do some minor twicking to further personalize my page. I tested the page&#8217;s comment engine, posting, plugin and widget capabilities but was repeatedly bombarded with this error [...]]]></description>
			<content:encoded><![CDATA[<p>I downloaded a <a href="http://www.askgraphics.com/freetemplates/greybox-theme/" target="_blank">very cool theme</a> for this blog and luckily, I successfully installed it in my local instance of WordPress. Satisfying the OC in me, I immediately do some minor twicking to further personalize my page. I tested the page&#8217;s comment engine, posting, plugin and widget capabilities but was repeatedly bombarded with this error every time I click a button that causes the page to reload:</p>
<blockquote><p><strong>Warning:</strong> Cannot modify header information - headers already sent by (output started at / my_site/wp-content/themes/new_theme/functions.php:2) in <strong>/my_site /wp-includes/pluggable.php</strong> on line <strong>694</strong></p></blockquote>
<p><span id="more-14"></span>Having no professional experience in php, my first instinct is to google on the topic and I came across <a href="http://www.jaguarpc.com/forums/showthread.php?t=15064" target="_blank">this forum post</a>:</p>
<blockquote><p>mattsiegman: it will break if you have any space before your &lt;?</p></blockquote>
<p>The thread suggested different solutions but I tried the simplest one. I opened my functions.php file and found this:</p>
<div class="dean_ch" style="white-space: wrap;"><span class="kw2">&lt;?php</span><br />
<span class="kw1">if</span> <span class="br0">&#40;</span> <a href="http://www.php.net/function_exists"><span class="kw3">function_exists</span></a><span class="br0">&#40;</span><span class="st0">&#8216;register_sidebar&#8217;</span><span class="br0">&#41;</span> <span class="br0">&#41;</span><br />
<span class="br0">&#123;</span><br />
&nbsp; &nbsp; register_sidebar<span class="br0">&#40;</span><a href="http://www.php.net/array"><span class="kw3">array</span></a><span class="br0">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&#8216;before_widget&#8217;</span> =&gt; <span class="st0">&#8216;&lt;li id=&quot;%1$s&quot; class=&quot;widget %2$s&quot;&gt;&#8217;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&#8216;after_widget&#8217;</span> =&gt; <span class="st0">&#8216;&lt;/li&gt;&#8217;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&#8216;before_title&#8217;</span> =&gt; <span class="st0">&#8216;&lt;h2 class=&quot;widgettitle&quot;&gt;&#8217;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&#8216;after_title&#8217;</span> =&gt; <span class="st0">&#8216;&lt;/h2&gt;&#8217;</span>,</div>
<p>I have a space (linebreak) on my first line, I deleted it, saved and refreshed my browser. Voila! The error was gone. See how complicated problems can be solved by simple solutions?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kikosantos.net/tech/2008/05/php-cannot-modify-header-information/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Returning the ID of a Newly Created Row in Oracle’s PL-SQL</title>
		<link>http://www.kikosantos.net/tech/2007/06/returning-the-id-of-a-newly-created-row-in-oracles-pl-sql/</link>
		<comments>http://www.kikosantos.net/tech/2007/06/returning-the-id-of-a-newly-created-row-in-oracles-pl-sql/#comments</comments>
		<pubDate>Fri, 22 Jun 2007 13:27:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://kikosantos.wordpress.com/2007/06/22/returning-the-id-of-a-newly-created-row-in-oracle%e2%80%99s-pl-sql/</guid>
		<description><![CDATA[Having years of background developing applications using MSSQL Server as the database, I encountered a roadblock when my stored procedure is required to return the id for my newly created row in oracle.
Immediate Work-Around
Since all my tables have a timestamp field, the most obvious thing to do is to query the topmost row of my [...]]]></description>
			<content:encoded><![CDATA[<p>Having years of background developing applications using MSSQL Server as the database, I encountered a roadblock when my stored procedure is required to return the id for my newly created row in oracle.</p>
<p><strong>Immediate Work-Around</strong></p>
<p>Since all my tables have a timestamp field, the most obvious thing to do is to query the topmost row of my table sorted by the timestamp field. For added accuracy, I also filtered my query against the userid which created the affected row.</p>
<p><span id="more-13"></span></p>
<div class="dean_ch" style="white-space: wrap;"><a href="http://www.oracle.com/pls/db92/db92.drilldown?word=CREATE"><span class="kw1">CREATE</span></a> <a href="http://www.oracle.com/pls/db92/db92.drilldown?word=OR"><span class="kw1">OR</span></a> <a href="http://www.oracle.com/pls/db92/db92.drilldown?word=REPLACE"><span class="kw2">REPLACE</span></a> <a href="http://www.oracle.com/pls/db92/db92.drilldown?word=PROCEDURE"><span class="kw1">PROCEDURE</span></a> SP_CUSTOMERS<br />
<span class="br0">&#40;</span><br />
&nbsp; &nbsp; pLAST_NAME <a href="http://www.oracle.com/pls/db92/db92.drilldown?word=IN"><span class="kw1">IN</span></a> CUSTOMERS.LAST_NAME%<a href="http://www.oracle.com/pls/db92/db92.drilldown?word=TYPE"><span class="kw1">TYPE</span></a><br />
,&nbsp; &nbsp;pFIRST_NAME <a href="http://www.oracle.com/pls/db92/db92.drilldown?word=IN"><span class="kw1">IN</span></a> CUSTOMERS.FIRST_NAME%<a href="http://www.oracle.com/pls/db92/db92.drilldown?word=TYPE"><span class="kw1">TYPE</span></a><br />
,&nbsp; &nbsp;pCREATED_BY <a href="http://www.oracle.com/pls/db92/db92.drilldown?word=IN"><span class="kw1">IN</span></a> CUSTOMERS.CREATED_BY%<a href="http://www.oracle.com/pls/db92/db92.drilldown?word=TYPE"><span class="kw1">TYPE</span></a><br />
,&nbsp; &nbsp;pCREATED_DT <a href="http://www.oracle.com/pls/db92/db92.drilldown?word=IN"><span class="kw1">IN</span></a> CUSTOMERS.CREATED_DT%<a href="http://www.oracle.com/pls/db92/db92.drilldown?word=TYPE"><span class="kw1">TYPE</span></a><br />
,&nbsp; &nbsp;pCUSTOMER_CD <a href="http://www.oracle.com/pls/db92/db92.drilldown?word=OUT"><span class="kw1">OUT</span></a> CUSTOMERS.CUSTOMER_CD%<a href="http://www.oracle.com/pls/db92/db92.drilldown?word=TYPE"><span class="kw1">TYPE</span></a><br />
<span class="br0">&#41;</span><br />
<a href="http://www.oracle.com/pls/db92/db92.drilldown?word=IS"><span class="kw1">IS</span></a><br />
<a href="http://www.oracle.com/pls/db92/db92.drilldown?word=BEGIN"><span class="kw1">BEGIN</span></a></p>
<p><a href="http://www.oracle.com/pls/db92/db92.drilldown?word=INSERT"><span class="kw1">INSERT</span></a> <a href="http://www.oracle.com/pls/db92/db92.drilldown?word=INTO"><span class="kw1">INTO</span></a> CUSTOMERS<br />
<span class="br0">&#40;</span><br />
&nbsp; &nbsp; LAST_NAME<br />
,&nbsp; &nbsp;FIRST_NAME<br />
,&nbsp; &nbsp;CREATED_BY<br />
,&nbsp; &nbsp;CREATED_DT<br />
<span class="br0">&#41;</span><br />
<a href="http://www.oracle.com/pls/db92/db92.drilldown?word=VALUES"><span class="kw1">VALUES</span></a><br />
<span class="br0">&#40;</span><br />
&nbsp; &nbsp; pLAST_NAME<br />
,&nbsp; &nbsp;pFIRST_NAME<br />
,&nbsp; &nbsp;pCREATED_BY<br />
,&nbsp; &nbsp;pCREATED_DT<br />
<span class="br0">&#41;</span>;</p>
<p><a href="http://www.oracle.com/pls/db92/db92.drilldown?word=SELECT"><span class="kw1">SELECT</span></a>&nbsp; CUSTOMER_CD<br />
<a href="http://www.oracle.com/pls/db92/db92.drilldown?word=INTO"><span class="kw1">INTO</span></a>&nbsp; &nbsp; pCUSTOMER_CD<br />
<a href="http://www.oracle.com/pls/db92/db92.drilldown?word=FROM"><span class="kw1">FROM</span></a>&nbsp; &nbsp; CUSTOMERS<br />
<a href="http://www.oracle.com/pls/db92/db92.drilldown?word=WHERE"><span class="kw1">WHERE</span></a>&nbsp; &nbsp;created_by = pCREATED_BY<br />
<a href="http://www.oracle.com/pls/db92/db92.drilldown?word=AND"><span class="kw1">AND</span></a>&nbsp;&nbsp; &nbsp; created_dt = pCREATED_DT;</p>
<p><a href="http://www.oracle.com/pls/db92/db92.drilldown?word=END"><span class="kw1">END</span></a> SP_ARTIST_ADD;<br />
/</div>
<p>While the above solution works, I am convinced that there is a better and correct method of doing it. In MSSQL Server, select @@identity is sufficient for the job but how about in Oracle?</p>
<p><strong>The Oracle Way</strong></p>
<p>Googling on the topic, I came across an article entitled <a href="http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96624/12_tune.htm#43345" target="_blank">Tuning PL/SQL Performance with the RETURNING Clause</a> which solved my problem. It turns out the PL/SQL has a returning clause which returns column values from the affected row into PL/SQL variables or host variables. According to the article, “<em>it eliminates the need to SELECT the row after an insert or update, or before a delete. As a result, fewer network round trips, less server CPU time, fewer cursors, and less server memory are required</em>”. Now, revising my SP with the returning clause included.</p>
<div class="dean_ch" style="white-space: wrap;"><a href="http://www.oracle.com/pls/db92/db92.drilldown?word=CREATE"><span class="kw1">CREATE</span></a> <a href="http://www.oracle.com/pls/db92/db92.drilldown?word=OR"><span class="kw1">OR</span></a> <a href="http://www.oracle.com/pls/db92/db92.drilldown?word=REPLACE"><span class="kw2">REPLACE</span></a> <a href="http://www.oracle.com/pls/db92/db92.drilldown?word=PROCEDURE"><span class="kw1">PROCEDURE</span></a> SP_CUSTOMERS<br />
<span class="br0">&#40;</span><br />
&nbsp; &nbsp; pLAST_NAME <a href="http://www.oracle.com/pls/db92/db92.drilldown?word=IN"><span class="kw1">IN</span></a> CUSTOMERS.LAST_NAME%<a href="http://www.oracle.com/pls/db92/db92.drilldown?word=TYPE"><span class="kw1">TYPE</span></a><br />
,&nbsp; &nbsp;pFIRST_NAME <a href="http://www.oracle.com/pls/db92/db92.drilldown?word=IN"><span class="kw1">IN</span></a> CUSTOMERS.FIRST_NAME%<a href="http://www.oracle.com/pls/db92/db92.drilldown?word=TYPE"><span class="kw1">TYPE</span></a><br />
,&nbsp; &nbsp;pCREATED_BY <a href="http://www.oracle.com/pls/db92/db92.drilldown?word=IN"><span class="kw1">IN</span></a> CUSTOMERS.CREATED_BY%<a href="http://www.oracle.com/pls/db92/db92.drilldown?word=TYPE"><span class="kw1">TYPE</span></a><br />
,&nbsp; &nbsp;pCREATED_DT <a href="http://www.oracle.com/pls/db92/db92.drilldown?word=IN"><span class="kw1">IN</span></a> CUSTOMERS.CREATED_DT%<a href="http://www.oracle.com/pls/db92/db92.drilldown?word=TYPE"><span class="kw1">TYPE</span></a><br />
,&nbsp; &nbsp;pCUSTOMER_CD <a href="http://www.oracle.com/pls/db92/db92.drilldown?word=OUT"><span class="kw1">OUT</span></a> CUSTOMERS.CUSTOMER_CD %<a href="http://www.oracle.com/pls/db92/db92.drilldown?word=TYPE"><span class="kw1">TYPE</span></a><br />
<span class="br0">&#41;</span><br />
<a href="http://www.oracle.com/pls/db92/db92.drilldown?word=IS"><span class="kw1">IS</span></a><br />
<a href="http://www.oracle.com/pls/db92/db92.drilldown?word=BEGIN"><span class="kw1">BEGIN</span></a></p>
<p><a href="http://www.oracle.com/pls/db92/db92.drilldown?word=INSERT"><span class="kw1">INSERT</span></a> <a href="http://www.oracle.com/pls/db92/db92.drilldown?word=INTO"><span class="kw1">INTO</span></a> CUSTOMERS<br />
<span class="br0">&#40;</span><br />
&nbsp; &nbsp; LAST_NAME<br />
,&nbsp; &nbsp;FIRST_NAME<br />
,&nbsp; &nbsp;CREATED_BY<br />
,&nbsp; &nbsp;CREATED_DT<br />
<span class="br0">&#41;</span><br />
<a href="http://www.oracle.com/pls/db92/db92.drilldown?word=VALUES"><span class="kw1">VALUES</span></a><br />
<span class="br0">&#40;</span><br />
&nbsp; &nbsp; pLAST_NAME<br />
,&nbsp; &nbsp;pFIRST_NAME<br />
,&nbsp; &nbsp;pCREATED_BY<br />
,&nbsp; &nbsp;pCREATED_DT<br />
<span class="br0">&#41;</span></p>
<p>RETURNING CUSTOMER_CD <a href="http://www.oracle.com/pls/db92/db92.drilldown?word=INTO"><span class="kw1">INTO</span></a> pCUSTOMER_CD;</p>
<p><a href="http://www.oracle.com/pls/db92/db92.drilldown?word=END"><span class="kw1">END</span></a> SP_ARTIST_ADD;<br />
/</div>
<p>Pretty neat! Unlike @@identity, returning clause can return other fields in your table aside from your primary key making it more versatile, in my opinion, over its SQL Server counterpart.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kikosantos.net/tech/2007/06/returning-the-id-of-a-newly-created-row-in-oracles-pl-sql/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Tab AJAX Control Toolkit Style Problem</title>
		<link>http://www.kikosantos.net/tech/2007/02/tab-ajax-control-toolkit-style-problem/</link>
		<comments>http://www.kikosantos.net/tech/2007/02/tab-ajax-control-toolkit-style-problem/#comments</comments>
		<pubDate>Wed, 14 Feb 2007 12:35:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[asp.net]]></category>

		<guid isPermaLink="false">http://kikosantos.wordpress.com/2007/02/14/tab-ajax-control-toolkit-style-problem/</guid>
		<description><![CDATA[If you&#8217;ll ask all the ASP.Net developers on what control they want Microsoft to create and include freely, I bet that Tab Control is in the top 5 list. Well, now our dreams finally came true. With the released ASP.Net AJAX last January 2007, the ASP.Net AJAX Team included 4 new controls that are not [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ll ask all the ASP.Net developers on what control they want Microsoft to create and include freely, I bet that Tab Control is in the top 5 list. Well, now our dreams finally came true. With the released ASP.Net AJAX last January 2007, the ASP.Net AJAX Team included 4 new controls that are not in their RC1 and Tab Control is one of them (others are AutoComplete, Calendar, MaskedEdit).</p>
<p>Now I am currently involved in a web application development that is deeply in need of tab-based navigation to greatly improve the page&#8217;s user friendliness. We <a href="http://www.codeplex.com/Release/ProjectReleases.aspx?ProjectName=AtlasControlToolkit" target="_blank">downloaded</a> and installed that AJAXToolkit from ASP.Net site, plugged it in one of your page, provided it&#8217;s required and necessary properties saved the file and refreshed the page. Our fingers were crossed with be waited for the progress bar to reached it&#8217;s maximum length and after the page was rendered, this is what we saw.</p>
<p><span id="more-12"></span></p>
<p style="text-align:center;"><img src="http://i72.photobucket.com/albums/i168/senselessfeats/techblog/entry/20070214/tab-error.gif" alt="" /></p>
<p>Not what we expected right?</p>
<p><strong>Cause<br />
</strong><br />
Since the release of ASP.Net 2.0, all the pages&#8217; DTD are set to <em><strong>XHTML 1.0 Transitional</strong></em> by default. Consequently, AJAX Control Toolkits were also created to adhere with standard. All the rendered AJAX controls will follow the said document type definition. As it turns out, our page only adhere to <em><strong>HTML 4.01 Transitional </strong></em>DTD making the tab looked distorted.</p>
<p><strong>Solution<br />
</strong><br />
Well one solution it to change the DTD of your page to XHTML 1.0 Transitional. This will quickly fixed your problem (best practice as well). But if time is not in your side you can do a little CSS hack to make your tab looking good again. Just include the CSS code below internally inside your page:</p>
<div class="dean_ch" style="white-space: wrap;">&lt;style type=”<span class="kw2">text</span>/css”&gt;</p>
<p><span class="re1">.ajax__tab_default</span> <span class="re1">.ajax__tab_inner</span> <span class="br0">&#123;</span><span class="kw1">height</span> : <span class="re3"><span class="nu0">100</span>%</span>;<span class="br0">&#125;</span><br />
<span class="re1">.ajax__tab_default</span> <span class="re1">.ajax__tab_tab</span> <span class="br0">&#123;</span><span class="kw1">height</span> : <span class="re3"><span class="nu0">100</span>%</span>;<span class="br0">&#125;</span></p>
<p><span class="re1">.ajax__tab_xp</span> <span class="re1">.ajax__tab_hover</span> <span class="re1">.ajax__tab_tab</span> <span class="br0">&#123;</span><span class="kw1">height</span> : <span class="re3"><span class="nu0">100</span>%</span>;<span class="br0">&#125;</span><br />
<span class="re1">.ajax__tab_xp</span> <span class="re1">.ajax__tab_active</span> <span class="re1">.ajax__tab_tab</span> <span class="br0">&#123;</span><span class="kw1">height</span> : <span class="re3"><span class="nu0">100</span>%</span>;<span class="br0">&#125;</span></p>
<p><span class="re1">.ajax__tab_xp</span> <span class="re1">.ajax__tab_inner</span> <span class="br0">&#123;</span><span class="kw1">height</span> : <span class="re3"><span class="nu0">100</span>%</span>;<span class="br0">&#125;</span><br />
<span class="re1">.ajax__tab_xp</span> <span class="re1">.ajax__tab_tab</span> <span class="br0">&#123;</span>height<span class="re2">:<span class="nu0">100</span></span>%<span class="br0">&#125;</span><br />
<span class="re1">.ajax__tab_xp</span> <span class="re1">.ajax__tab_hover</span> <span class="re1">.ajax__tab_inner</span> <span class="br0">&#123;</span><span class="kw1">height</span> : <span class="re3"><span class="nu0">100</span>%</span>;<span class="br0">&#125;</span><br />
<span class="re1">.ajax__tab_xp</span> <span class="re1">.ajax__tab_active</span> <span class="re1">.ajax__tab_inner</span> <span class="br0">&#123;</span><span class="kw1">height</span> : <span class="re3"><span class="nu0">100</span>%</span>;<span class="br0">&#125;</span></p>
<p>&lt;/style&gt;</p></div>
<p>Voila. Just remember that the CSS should be <strong>inside</strong> your .aspx file and not in an external .css file. The style will not take effect in doing so.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kikosantos.net/tech/2007/02/tab-ajax-control-toolkit-style-problem/feed/</wfw:commentRss>
		</item>
		<item>
		<title>DataFormatString For DateTime Column</title>
		<link>http://www.kikosantos.net/tech/2006/09/dataformatstring-for-datetime-column/</link>
		<comments>http://www.kikosantos.net/tech/2006/09/dataformatstring-for-datetime-column/#comments</comments>
		<pubDate>Fri, 01 Sep 2006 04:11:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[asp.net]]></category>

		<guid isPermaLink="false">https://kikosantos.wordpress.com/2006/09/01/dataformatstring-for-datetime-column/</guid>
		<description><![CDATA[I was coding with breeze rendering my tabular data with the use of a GridView control. I successfully bound it to my ObjectDataSource and the data were displaying just fine except for one minute problem. My DateTime column  was rendered as &#8220;raw&#8221; format from my SQL Server. This means that my date column displays [...]]]></description>
			<content:encoded><![CDATA[<p>I was coding with breeze rendering my tabular data with the use of a GridView control. I successfully bound it to my ObjectDataSource and the data were displaying just fine except for one minute problem. My DateTime column  was rendered as &#8220;raw&#8221; format from my SQL Server. This means that my date column displays &#8220;8/12/2006 11:47 AM&#8221;.</p>
<p>Using my experience from DataGrid control from my ASP.Net 1.1 days, I immediately set the value of my DateTime column&#8217;s DataFormatString property to  &#8220;{0:d}&#8221; (short datetime format).  I saved the page and refreshed the browser finding my DateTime column still displaying the same &#8220;raw&#8221; format. What seems to be the problem?</p>
<p><span id="more-11"></span></p>
<p>After some time searching for solutions, I came across <a href="http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=101998" target="_blank">this article</a> from  Microsoft Connect site. It says that string formatting for DataFormatString works well with ASP.NET 2.0 up until their Beta 2 release.</p>
<p>Solution?  Just  set the HtmlEncode property of your BoundField from true (default) to false.  MS explanation:</p>
<blockquote><p><em>This is by design. Because HtmlEncode is on, the data is retrieved from the data store, HtmlEncoded, and then the format string is applied. By HtmlEncoding the value from the data store, we are protecting unsafe script from the data store from being displayed to the client.</em></p></blockquote>
<p>Now we know <img src='http://www.kikosantos.net/tech/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.kikosantos.net/tech/2006/09/dataformatstring-for-datetime-column/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
