<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://community.sgdotnet.org/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Soup Recipes</title><link>http://community.sgdotnet.org/blogs/usoup/default.aspx</link><description>what makes a good soup</description><dc:language>en</dc:language><generator>CommunityServer 2008.5 (Build: 30912.2823)</generator><item><title>Quick Find on Command Prompt Result</title><link>http://community.sgdotnet.org/blogs/usoup/archive/2009/11/10/quick-find-on-command-prompt-result.aspx</link><pubDate>Tue, 10 Nov 2009 04:10:00 GMT</pubDate><guid isPermaLink="false">9f588fb1-4571-42db-9419-e7c908124e96:224479</guid><dc:creator>usoup</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://community.sgdotnet.org/blogs/usoup/rsscomments.aspx?PostID=224479</wfw:commentRss><comments>http://community.sgdotnet.org/blogs/usoup/archive/2009/11/10/quick-find-on-command-prompt-result.aspx#comments</comments><description>&lt;p&gt;This kind of windows command is good to trace network connectivity. We can retrieve result specifically on certain search conditions. The best part is, we can keep the tracing alive:&lt;/p&gt;  &lt;p&gt;netstat -an 5 | findstr 1433&lt;/p&gt;  &lt;p&gt;A few tricks are in place here:&lt;/p&gt;  &lt;p&gt;1. Netstat with interval. This will keep the trace alive.&lt;/p&gt;  &lt;p&gt;2. piped command, which in this case the second command “findstr” is used to search result of the previous command.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Of course you can also do something like this, to have 2 search “AND” criteria:&lt;/p&gt;  &lt;p&gt;netstat -an 5 | findstr 135 | findstr /L /I listen&lt;/p&gt;  &lt;p&gt;or even use a different windows command for the first part. It’s easy and flexible especially if you can’t bring in any applications into production servers. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://community.sgdotnet.org/aggbug.aspx?PostID=224479" width="1" height="1"&gt;</description><category domain="http://community.sgdotnet.org/blogs/usoup/archive/tags/Utilities/default.aspx">Utilities</category><category domain="http://community.sgdotnet.org/blogs/usoup/archive/tags/Windows/default.aspx">Windows</category><category domain="http://community.sgdotnet.org/blogs/usoup/archive/tags/How-To/default.aspx">How-To</category></item><item><title>Yes, Security Does Not Come Hand-In-Hand With Convenience</title><link>http://community.sgdotnet.org/blogs/usoup/archive/2009/10/23/yes-security-does-not-come-hand-in-hand-with-convenience.aspx</link><pubDate>Fri, 23 Oct 2009 05:03:00 GMT</pubDate><guid isPermaLink="false">9f588fb1-4571-42db-9419-e7c908124e96:224467</guid><dc:creator>usoup</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://community.sgdotnet.org/blogs/usoup/rsscomments.aspx?PostID=224467</wfw:commentRss><comments>http://community.sgdotnet.org/blogs/usoup/archive/2009/10/23/yes-security-does-not-come-hand-in-hand-with-convenience.aspx#comments</comments><description>&lt;p&gt;But, I didn’t know it also didn’t come hand-in-hand with learning (Note: the blocked website is the national library website). No wonder the security here is at its best!&lt;/p&gt;  &lt;p&gt;&lt;a href="http://community.sgdotnet.org/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/usoup/policy_5F00_2FE10773.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="policy" border="0" alt="policy" src="http://community.sgdotnet.org/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/usoup/policy_5F00_thumb_5F00_26F405E5.png" width="436" height="315" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://community.sgdotnet.org/aggbug.aspx?PostID=224467" width="1" height="1"&gt;</description><category domain="http://community.sgdotnet.org/blogs/usoup/archive/tags/Knowledge/default.aspx">Knowledge</category><category domain="http://community.sgdotnet.org/blogs/usoup/archive/tags/Technology/default.aspx">Technology</category></item><item><title>Mystery Google – The Goldmine?</title><link>http://community.sgdotnet.org/blogs/usoup/archive/2009/10/21/mystery-google-the-goldmine.aspx</link><pubDate>Wed, 21 Oct 2009 03:12:00 GMT</pubDate><guid isPermaLink="false">9f588fb1-4571-42db-9419-e7c908124e96:224462</guid><dc:creator>usoup</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://community.sgdotnet.org/blogs/usoup/rsscomments.aspx?PostID=224462</wfw:commentRss><comments>http://community.sgdotnet.org/blogs/usoup/archive/2009/10/21/mystery-google-the-goldmine.aspx#comments</comments><description>&lt;p&gt;&lt;a title="http://www.mysterygoogle.com/" href="http://www.mysterygoogle.com/"&gt;http://www.mysterygoogle.com/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;It looks plain silly (and fun) in the first glance – you get the result of previous search. Perhaps it’s in the spirit of the coming Halloween. But, I suppose there are 2 ways to exploit this unique feature:&lt;/p&gt;  &lt;p&gt;1. Free Marketing! Google your name, your product name, your corporate name a million times, and a million other people will get to see it. That’s provided your names are on top of the search result! Get the idea?&lt;/p&gt;  &lt;p&gt;“&lt;em&gt;A million search, you said? How to achieve that?&lt;/em&gt;” Well, I suppose if you know how to programmatically host a web browser component, or make a HTTP POST request, it might work. Need to research the details, though. And fyi, it is evil.&lt;/p&gt;  &lt;p&gt;2. Cataloguing the keywords used for searches. Some search keywords proved to be online real-estate, where advertisers pay a handsome amount for it so that their products appear first in search engine results. And which keywords that users sought most? Of course there are many options for this, but isn’t it better if you have &lt;em&gt;1 more source&lt;/em&gt; of &lt;em&gt;reliable&lt;/em&gt; data?&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Why it can work?&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;A quick Googling on “Mystery Google” (exact match) showed that it has “about &lt;strong&gt;410,000” &lt;/strong&gt;results. So, at least 410,000 people has known this site. Times with the number of readers to the site, times with the number of search on the site. Easily get to millions, i guess. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;A proper research need to be done here.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://community.sgdotnet.org/aggbug.aspx?PostID=224462" width="1" height="1"&gt;</description><category domain="http://community.sgdotnet.org/blogs/usoup/archive/tags/Technology/default.aspx">Technology</category><category domain="http://community.sgdotnet.org/blogs/usoup/archive/tags/Google/default.aspx">Google</category></item><item><title>What is BizTalk Server Actually?</title><link>http://community.sgdotnet.org/blogs/usoup/archive/2009/10/19/what-is-biztalk-server-actually.aspx</link><pubDate>Mon, 19 Oct 2009 08:17:00 GMT</pubDate><guid isPermaLink="false">9f588fb1-4571-42db-9419-e7c908124e96:224456</guid><dc:creator>usoup</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://community.sgdotnet.org/blogs/usoup/rsscomments.aspx?PostID=224456</wfw:commentRss><comments>http://community.sgdotnet.org/blogs/usoup/archive/2009/10/19/what-is-biztalk-server-actually.aspx#comments</comments><description>&lt;p&gt;Yes, I get that questions quite often. So, it’s great when I found out about BizTalk Server 2009 posters. “A picture is worth a thousand words”, so they say…&lt;/p&gt;  &lt;p&gt;&lt;a title="http://msdn.microsoft.com/en-us/library/dd450982(BTS.10).aspx" href="http://msdn.microsoft.com/en-us/library/dd450982(BTS.10).aspx"&gt;http://msdn.microsoft.com/en-us/library/dd450982(BTS.10).aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;And my personal favourite is the &lt;a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;amp;FamilyID=d022a0a4-3b27-49cf-b47c-16d8458a1be2" target="_blank"&gt;Runtime Architecture Poster&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://community.sgdotnet.org/aggbug.aspx?PostID=224456" width="1" height="1"&gt;</description><category domain="http://community.sgdotnet.org/blogs/usoup/archive/tags/BizTalk/default.aspx">BizTalk</category></item><item><title>Windows Server 2008 on Windows XP Dual Boot configuration – Missing dual-boot screen</title><link>http://community.sgdotnet.org/blogs/usoup/archive/2009/09/29/windows-server-2008-on-windows-xp-dual-boot-configuration-missing-dual-boot-screen.aspx</link><pubDate>Tue, 29 Sep 2009 11:12:00 GMT</pubDate><guid isPermaLink="false">9f588fb1-4571-42db-9419-e7c908124e96:224433</guid><dc:creator>usoup</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://community.sgdotnet.org/blogs/usoup/rsscomments.aspx?PostID=224433</wfw:commentRss><comments>http://community.sgdotnet.org/blogs/usoup/archive/2009/09/29/windows-server-2008-on-windows-xp-dual-boot-configuration-missing-dual-boot-screen.aspx#comments</comments><description>&lt;p&gt;Continuing from previous post…&lt;/p&gt;  &lt;p&gt;So, my installation of &lt;a href="http://www.microsoft.com/windowsserver2008/en/us/default.aspx" target="_blank"&gt;Windows Server 2008&lt;/a&gt; on 2nd partition, on top of existing Windows XP was fine. No hiccup whatsoever. I proceeded with running the Windows update, and then the adding server role. So far so good. Then it requires restart. No problem, until the Windows Server 2008 was loaded successfully. Hey, where’s my dual-boot screen? &lt;/p&gt;  &lt;p&gt;Following the KB, if I install the older Windows first, then the newer Windows, the dual boot screen should be available. This is confirmed by this &lt;a href="http://support.microsoft.com/kb/919529" target="_blank"&gt;KB article&lt;/a&gt;. So, quick check on the boot sector shows that indeed, my Windows XP entry was gone. My “displayorder” was referencing to only the Windows Server 2008 path.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://community.sgdotnet.org/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/usoup/image_5F00_01774667.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://community.sgdotnet.org/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/usoup/image_5F00_thumb_5F00_6A4BCBE8.png" width="500" height="345" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;So, following the KB, I tried to re-create the entry:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font color="#0000a0" face="Courier New"&gt;bcdedit /create {ntldr} /d “Windows XP OEM”&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;a href="http://community.sgdotnet.org/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/usoup/image_5F00_2A15B26E.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://community.sgdotnet.org/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/usoup/image_5F00_thumb_5F00_50E3C8AE.png" width="491" height="101" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;“The specified entry already exists”??? Hmm… Let’s dig it out:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font color="#0000a0" face="Courier New"&gt;bcdedit /enum {ntldr}&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;a href="http://community.sgdotnet.org/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/usoup/image_5F00_6569182C.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://community.sgdotnet.org/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/usoup/image_5F00_thumb_5F00_0C372E6D.png" width="488" height="171" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Hey, It’s there! But, wait, it’s pointing to “C:\”. Ohh, when I installed the Windows Server 2008, the new partition was assigned letter C, and the other partition (that contains the Windows XP files) was assigned letter D. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://community.sgdotnet.org/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/usoup/image_5F00_20BC7DEB.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://community.sgdotnet.org/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/usoup/image_5F00_thumb_5F00_1C45FD24.png" width="493" height="100" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Easy then. So I’ll just need to change the path, and set it back to “displayorder”.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font color="#0000a0" face="Courier New"&gt;bcdedit /set {ntldr} device partition=d:&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font color="#0000a0" face="Courier New"&gt;bcdedit /displayorder {ntldr} /addlast&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://community.sgdotnet.org/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/usoup/image_5F00_54F0A731.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://community.sgdotnet.org/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/usoup/image_5F00_thumb_5F00_25358F63.png" width="518" height="504" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Restart, and voila!&lt;/p&gt;  &lt;p&gt;&lt;a href="http://community.sgdotnet.org/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/usoup/image_5F00_524A7C31.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://community.sgdotnet.org/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/usoup/image_5F00_thumb_5F00_020824B1.png" width="500" height="376" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;(What? You’ve never seen a CRT monitor before?)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://community.sgdotnet.org/aggbug.aspx?PostID=224433" width="1" height="1"&gt;</description><category domain="http://community.sgdotnet.org/blogs/usoup/archive/tags/Utilities/default.aspx">Utilities</category><category domain="http://community.sgdotnet.org/blogs/usoup/archive/tags/Windows/default.aspx">Windows</category><category domain="http://community.sgdotnet.org/blogs/usoup/archive/tags/Installation/default.aspx">Installation</category><category domain="http://community.sgdotnet.org/blogs/usoup/archive/tags/Windows+Server+2008/default.aspx">Windows Server 2008</category></item><item><title>Windows Server 2008 on Windows XP Dual Boot configuration - Preparation</title><link>http://community.sgdotnet.org/blogs/usoup/archive/2009/09/29/windows-server-2008-on-windows-xp-dual-boot-configuration-preparation.aspx</link><pubDate>Tue, 29 Sep 2009 10:40:00 GMT</pubDate><guid isPermaLink="false">9f588fb1-4571-42db-9419-e7c908124e96:224432</guid><dc:creator>usoup</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://community.sgdotnet.org/blogs/usoup/rsscomments.aspx?PostID=224432</wfw:commentRss><comments>http://community.sgdotnet.org/blogs/usoup/archive/2009/09/29/windows-server-2008-on-windows-xp-dual-boot-configuration-preparation.aspx#comments</comments><description>&lt;p&gt;Due to low hardware specs that I have (mostly with 1-2GB RAM specs, with a 3GHz processor) I was usually quite reluctant to run many virtual machines. (I was looking for a way to setup something like a grid of PC/laptops though, like Google’s grid of “cheap”-PCs which hosted their &lt;a title="Google File System" href="http://labs.google.com/papers/gfs.html" target="_blank"&gt;Google File System&lt;/a&gt;. Not sure if it’s even economically feasible for consumer like me. :D) But now, I need to setup a BizTalk Server 2009 development environment, so, die die also must do now.&lt;/p&gt;  &lt;p&gt;Anyway, I was reading about Windows 7 dual-boot from VHD from Keith Combs’ &lt;a href="http://blogs.technet.com/keithcombs/archive/2009/05/22/dual-boot-from-vhd-using-windows-7-and-windows-server-2008-r2.aspx" target="_blank"&gt;blog&lt;/a&gt;, and was getting all excited of the thought of being able to setup Windows Server 2008 on my existing XP machine. Then, I realised that it’s only possible on &lt;a href="http://www.microsoft.com/windows/" target="_blank"&gt;Windows 7&lt;/a&gt; and &lt;a href="http://www.microsoft.com/windowsserver2008/en/us/default.aspx" target="_blank"&gt;Windows Server 2008 &lt;font color="#ff0000"&gt;&lt;strong&gt;R2&lt;/strong&gt;&lt;/font&gt;&lt;/a&gt;! I discovered it the hard way, when I tried (and failed with unrecognised command) to create a new virtual disk using diskpart. :( I suspect that it’s because Windows XP diskpart is still on version 5.1.3565, and Windows Server 2008 is on version 6.0.6002. And, Windows Server 2008 R2 is currently only available in 64-bit edition. Arghh!!!! My machine is only 32bit, and I need Windows Server 2008! (I still need to verify this though, as I read some articles mentioned about creating vdisk using diskpart available in Vista and Windows Server 2008. Pointers or comments are welcomed.)&lt;/p&gt;  &lt;p&gt;So, next plan was to do the old school way. Partition my harddisk, and install Windows Server 2008 on the new partition, on dual-boot configuration with the current Windows XP. (Sorry &lt;em&gt;lah&lt;/em&gt;, company asset, still on Windows XP.) So, first step, obviously is having installation disk. But instead of burning a DVD, I used my 2GB SanDisk USB drive, with reference to Dennis Chung’s &lt;a href="http://pingdennis.com/windows/installing-windows-7-using-a-usb-stick/" target="_blank"&gt;blog&lt;/a&gt;. Well, enough with surprises, WinXP diskpart does not recognise USB drive, so I have to create my installation USB drive using my Windows Vista.&lt;/p&gt;  &lt;p&gt;All set, time to install. To be continued…&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://community.sgdotnet.org/aggbug.aspx?PostID=224432" width="1" height="1"&gt;</description><category domain="http://community.sgdotnet.org/blogs/usoup/archive/tags/Windows/default.aspx">Windows</category><category domain="http://community.sgdotnet.org/blogs/usoup/archive/tags/Google/default.aspx">Google</category><category domain="http://community.sgdotnet.org/blogs/usoup/archive/tags/Windows+7/default.aspx">Windows 7</category><category domain="http://community.sgdotnet.org/blogs/usoup/archive/tags/Installation/default.aspx">Installation</category><category domain="http://community.sgdotnet.org/blogs/usoup/archive/tags/Windows+Server+2008/default.aspx">Windows Server 2008</category><category domain="http://community.sgdotnet.org/blogs/usoup/archive/tags/virtualization/default.aspx">virtualization</category></item><item><title>BizTalk Server 2009 Officially Released</title><link>http://community.sgdotnet.org/blogs/usoup/archive/2009/04/29/biztalk-server-2009-officially-released.aspx</link><pubDate>Wed, 29 Apr 2009 00:46:33 GMT</pubDate><guid isPermaLink="false">9f588fb1-4571-42db-9419-e7c908124e96:224254</guid><dc:creator>usoup</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://community.sgdotnet.org/blogs/usoup/rsscomments.aspx?PostID=224254</wfw:commentRss><comments>http://community.sgdotnet.org/blogs/usoup/archive/2009/04/29/biztalk-server-2009-officially-released.aspx#comments</comments><description>&lt;p&gt;27th April 2009: BizTalk Server 2009 is &lt;a href="http://www.microsoft.com/presspass/press/2009/apr09/04-27BizTalkServer2009PR.mspx" target="_blank"&gt;officially released&lt;/a&gt; for general availability.&lt;/p&gt; &lt;p&gt;For some resources to get started, refer to Richard Seroter&amp;#39;s blog &lt;a href="http://seroter.wordpress.com/2009/04/27/quick-thoughts-on-formal-biztalk-2009-launch-today/" target="_blank"&gt;here&lt;/a&gt;, and Thiago&amp;#39;s blog &lt;a href="http://connectedthoughts.wordpress.com/2009/04/28/biztalk-server-2009-officially-released-and-installation-guides-updated/" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://community.sgdotnet.org/aggbug.aspx?PostID=224254" width="1" height="1"&gt;</description></item><item><title>Publishing BizTalk Web Service Method With No Input Parameter</title><link>http://community.sgdotnet.org/blogs/usoup/archive/2009/02/25/publishing-biztalk-web-service-method-with-no-input-parameter.aspx</link><pubDate>Tue, 24 Feb 2009 17:29:59 GMT</pubDate><guid isPermaLink="false">9f588fb1-4571-42db-9419-e7c908124e96:224120</guid><dc:creator>usoup</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://community.sgdotnet.org/blogs/usoup/rsscomments.aspx?PostID=224120</wfw:commentRss><comments>http://community.sgdotnet.org/blogs/usoup/archive/2009/02/25/publishing-biztalk-web-service-method-with-no-input-parameter.aspx#comments</comments><description>&lt;p&gt;The very first web service that we usually create in any programming language, turned out to be not-so-simple in BizTalk. Here&amp;#39;s classic example:&lt;/p&gt; &lt;p&gt;public class Service1 : System.Web.Services.WebService&lt;br /&gt;{  &lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [WebMethod]&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public string HelloWorld()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return &amp;quot;Hello World&amp;quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;} &lt;p&gt;&amp;nbsp; &lt;p&gt;And the problem is two-fold in BizTalk Server (which strictly adhering to message schemas): &lt;p&gt;1. If BizTalk Server is supposed to consume such web service, it is fairly known issue that we&amp;#39;ll need to generate an &amp;quot;empty&amp;quot; web message as input parameter to be passed to the method being called. Many sites have cited the resolution, so I&amp;#39;m not going to describe this case anymore. &lt;p&gt;&lt;a title="Error message when you try to build a project in BizTalk Server 2006" href="http://support.microsoft.com/kb/921043"&gt;Error message when you try to build a project in BizTalk Server 2006&lt;/a&gt; &lt;p&gt;2. The more problematic case (for me) is when we&amp;#39;re supposed to expose such service using BizTalk Server. Orchestration requires a trigger message to kick-off the orchestration. But, if i don&amp;#39;t have input parameter, how do I tell the web service published orchestration to start? The orchestration does expecting a multipart message with no message part (it&amp;#39;s a web message). Following standard procedure of publishing web service based on orchestration with request/response port, the signature of the web methods are created just fine. &lt;p&gt;&lt;a href="http://community.sgdotnet.org/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/usoup/BTS_5F00_WS_5F00_HelloWorld_5F00_2.png"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px;" height="221" alt="BTS_WS_HelloWorld" src="http://community.sgdotnet.org/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/usoup/BTS_5F00_WS_5F00_HelloWorld_5F00_thumb.png" width="655" border="0" /&gt;&lt;/a&gt;  &lt;p&gt;And my code in client application look like this: &lt;blockquote&gt; &lt;p&gt;textBox3.Text = test.HelloWorld(); &lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;where &amp;quot;test&amp;quot; is the web reference to the web service above. Notice that there is no input parameter here. But alas, I got this error: &lt;blockquote&gt; &lt;p&gt;&amp;quot;Internal SOAP Processing Failure&amp;quot;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Great! No event log entry. No message tracked in BizTalk&amp;nbsp; Admin Console. IIS log shows error 500. Scratching my head... &lt;p&gt;After some readings, found out that it could be due to the similar issue of no#1 above. Which means... I&amp;#39;ll need an input parameter!!! :o &lt;p&gt;&lt;a title="http://geekswithblogs.net/cyoung/articles/4634.aspx" href="http://geekswithblogs.net/cyoung/articles/4634.aspx"&gt;http://geekswithblogs.net/cyoung/articles/4634.aspx&lt;/a&gt; &lt;p&gt;&lt;a title="http://blogs.msdn.com/richardbpi/archive/2006/10/23/advanced-biztalk-2006-web-services-part-ii.aspx" href="http://blogs.msdn.com/richardbpi/archive/2006/10/23/advanced-biztalk-2006-web-services-part-ii.aspx"&gt;http://blogs.msdn.com/richardbpi/archive/2006/10/23/advanced-biztalk-2006-web-services-part-ii.aspx&lt;/a&gt; &lt;p&gt;&lt;a title="http://www.jonfancey.com/default.aspx" href="http://www.jonfancey.com/default.aspx"&gt;http://www.jonfancey.com/default.aspx&lt;/a&gt; (somehow i can&amp;#39;t find back the article that i&amp;#39;ve just read) &lt;p&gt;So, workaround is, instead of having a multipart message with no message part as incoming message, i created a normal multipart message with 1 bodypart. Any XML schema based body part. Sure enough, the webservice that was generated by the web service publishing wizard required an input parameter for the method. So, I have to open up the web service solution, removed the input parameter and add defaulting invokeParam code a bit. Rebuild, and it works. It&amp;#39;s as simple as that. Here&amp;#39;s the part that i&amp;#39;ve changed (on the asmx code behind. Code has been simplified.): &lt;p&gt;public string HelloWorld()&lt;br /&gt;{ &lt;blockquote&gt; &lt;p&gt;...&lt;/p&gt;&lt;/blockquote&gt; &lt;blockquote&gt; &lt;p&gt;// Parameter information&lt;br /&gt;USoup.WS101.XsdTypesBody.EmptyInputParam EmptyBody = new USoup.WS101.XsdTypesBody.EmptyInputParam();&lt;br /&gt;EmptyBody.SomeValue = System.DateTime.Now.ToLongTimeString(); &lt;/p&gt;&lt;/blockquote&gt; &lt;blockquote&gt; &lt;p&gt;...&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;} &lt;p&gt;Note: &amp;quot;USoup.WS101.XsdTypesBody.EmptyInputParam&amp;quot; is the multipart message that has bodypart. &amp;quot;SomeValue&amp;quot; is just a node in the message.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://community.sgdotnet.org/aggbug.aspx?PostID=224120" width="1" height="1"&gt;</description><category domain="http://community.sgdotnet.org/blogs/usoup/archive/tags/BizTalk/default.aspx">BizTalk</category><category domain="http://community.sgdotnet.org/blogs/usoup/archive/tags/How-To/default.aspx">How-To</category><category domain="http://community.sgdotnet.org/blogs/usoup/archive/tags/Web+Service/default.aspx">Web Service</category></item><item><title>Google, Microsoft, Apple sued over preview icons</title><link>http://community.sgdotnet.org/blogs/usoup/archive/2008/12/29/google-microsoft-apple-sued-over-preview-icons.aspx</link><pubDate>Mon, 29 Dec 2008 03:04:27 GMT</pubDate><guid isPermaLink="false">9f588fb1-4571-42db-9419-e7c908124e96:223945</guid><dc:creator>usoup</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://community.sgdotnet.org/blogs/usoup/rsscomments.aspx?PostID=223945</wfw:commentRss><comments>http://community.sgdotnet.org/blogs/usoup/archive/2008/12/29/google-microsoft-apple-sued-over-preview-icons.aspx#comments</comments><description>&lt;p&gt;&lt;a title="http://www.zdnetasia.com/news/internet/0,39044908,62049600,00.htm?scid=nl_z_ntnd" href="http://www.zdnetasia.com/news/internet/0,39044908,62049600,00.htm?scid=nl_z_ntnd"&gt;http://www.zdnetasia.com/news/internet/0,39044908,62049600,00.htm?scid=nl_z_ntnd&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Great! Next time we should pay George Lucas or Steven Spielberg royalty fees when we build the next inter-galactica space shuttle. Maybe I should have changed my job. Is multi-touch technology patented yet? Or how about the glass display panel?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://community.sgdotnet.org/aggbug.aspx?PostID=223945" width="1" height="1"&gt;</description><category domain="http://community.sgdotnet.org/blogs/usoup/archive/tags/Intellectual+Property/default.aspx">Intellectual Property</category><category domain="http://community.sgdotnet.org/blogs/usoup/archive/tags/Technology/default.aspx">Technology</category></item><item><title>Microsoft Touchwall</title><link>http://community.sgdotnet.org/blogs/usoup/archive/2008/06/10/Microsoft-Touchwall.aspx</link><pubDate>Tue, 10 Jun 2008 15:28:00 GMT</pubDate><guid isPermaLink="false">9f588fb1-4571-42db-9419-e7c908124e96:219653</guid><dc:creator>usoup</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://community.sgdotnet.org/blogs/usoup/rsscomments.aspx?PostID=219653</wfw:commentRss><comments>http://community.sgdotnet.org/blogs/usoup/archive/2008/06/10/Microsoft-Touchwall.aspx#comments</comments><description>&lt;p&gt;Those who have seen the &lt;a href="http://www.microsoft.com/surface/index.html" target="_blank"&gt;Microsoft Surface&lt;/a&gt;, or the &lt;a href="http://www.imdb.com/title/tt0181689/" target="_blank"&gt;Minority Report&lt;/a&gt;, will understand this technology: &lt;a href="https://www.microsoft.com/presspass/events/ceosummit/default.mspx" target="_blank"&gt;Microsoft Touchwall&lt;/a&gt;, dubbed as &amp;quot;Intelligent Whiteboard&amp;quot;. What&amp;#39;s that, you asked? Basically, having Surface multi-touch and movement recognition&amp;nbsp;capability on &lt;em&gt;any&lt;/em&gt; flat surface (or so it seems from the video). Bill Gates was showing&amp;nbsp;the Touchwall&amp;nbsp;during the CEO Summit 2008, using whiteboard. Yeah, plain &amp;#39;ol whiteboard. Imagine touching, poking, dragging your fingers on the whiteboard, while the images on the whiteboard is being moved/scaled/resized/played accordingly.&lt;/p&gt;&lt;p&gt;However, there was one big question here: if the &amp;quot;Intelligent Whiteboard&amp;quot; is supposed to be shown to audiences such as those powerpoint slides on projector, will it work when the presenter (in this case, Bill Gates) keep on blocking audience view??? *scratch head*&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://community.sgdotnet.org/aggbug.aspx?PostID=219653" width="1" height="1"&gt;</description><category domain="http://community.sgdotnet.org/blogs/usoup/archive/tags/Research/default.aspx">Research</category></item><item><title>silent install windows component</title><link>http://community.sgdotnet.org/blogs/usoup/archive/2008/04/07/silent-install-windows-component.aspx</link><pubDate>Mon, 07 Apr 2008 07:30:01 GMT</pubDate><guid isPermaLink="false">9f588fb1-4571-42db-9419-e7c908124e96:203961</guid><dc:creator>usoup</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://community.sgdotnet.org/blogs/usoup/rsscomments.aspx?PostID=203961</wfw:commentRss><comments>http://community.sgdotnet.org/blogs/usoup/archive/2008/04/07/silent-install-windows-component.aspx#comments</comments><description>&lt;p&gt;Note to self:&lt;/p&gt;  &lt;p&gt;If UI doesn't work, there's always command prompt.&lt;/p&gt;  &lt;p&gt;&lt;a title="http://support.microsoft.com/kb/222444" href="http://support.microsoft.com/kb/222444"&gt;http://support.microsoft.com/kb/222444&lt;/a&gt;&lt;/p&gt;&lt;img src="http://community.sgdotnet.org/aggbug.aspx?PostID=203961" width="1" height="1"&gt;</description><category domain="http://community.sgdotnet.org/blogs/usoup/archive/tags/Utilities/default.aspx">Utilities</category><category domain="http://community.sgdotnet.org/blogs/usoup/archive/tags/Windows/default.aspx">Windows</category><category domain="http://community.sgdotnet.org/blogs/usoup/archive/tags/How-To/default.aspx">How-To</category></item><item><title>Database normalisation</title><link>http://community.sgdotnet.org/blogs/usoup/archive/2008/02/28/Database-normalisation.aspx</link><pubDate>Thu, 28 Feb 2008 08:35:04 GMT</pubDate><guid isPermaLink="false">9f588fb1-4571-42db-9419-e7c908124e96:192456</guid><dc:creator>usoup</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://community.sgdotnet.org/blogs/usoup/rsscomments.aspx?PostID=192456</wfw:commentRss><comments>http://community.sgdotnet.org/blogs/usoup/archive/2008/02/28/Database-normalisation.aspx#comments</comments><description>&lt;p&gt;I was surprised and worried. &lt;/p&gt;  &lt;p&gt;Surprised, because my younger sister had just asked me about checking on her database normalisation homework. Apparently her school has taught them database normalisation (which means, her school taught them about relational database concept too, which means her school also taught them about computing, and perhaps a little bit of software development). &lt;u&gt;And she's still 1.5 years away from graduating from her &lt;strong&gt;high school&lt;/strong&gt;!&lt;/u&gt;&lt;/p&gt;  &lt;p&gt;Worried, because usually her school have about hundreds (and perhaps close to a thousand) students from her batch alone! (It is quite a big school, actually.) Who knows what else they could learn there. SOA? Corporate governance? Web 2.0? And these could be the batch that probably could do my current job by the time they graduate from university (or earlier)!!!! :o (At this time, you should imagine a scene from the Star Wars: &lt;a href="http://us.imdb.com/title/tt0121765/" target="_blank"&gt;Attack of the Clones&lt;/a&gt;, where the clones are ready for deployment! Or the robots from &lt;a href="http://us.imdb.com/title/tt0343818/" target="_blank"&gt;i, Robot&lt;/a&gt;!) &lt;/p&gt;  &lt;p&gt;&lt;img src="http://news.bbc.co.uk/media/images/39912000/jpg/_39912096_i_robot_pa.jpg" /&gt; &lt;/p&gt;  &lt;p&gt;(Image referenced from: &lt;a title="http://news.bbc.co.uk/media/images/39912000/jpg/_39912096_i_robot_pa.jpg" href="http://news.bbc.co.uk/media/images/39912000/jpg/_39912096_i_robot_pa.jpg"&gt;http://news.bbc.co.uk/media/images/39912000/jpg/_39912096_i_robot_pa.jpg&lt;/a&gt;)&lt;/p&gt;&lt;img src="http://community.sgdotnet.org/aggbug.aspx?PostID=192456" width="1" height="1"&gt;</description><category domain="http://community.sgdotnet.org/blogs/usoup/archive/tags/Knowledge/default.aspx">Knowledge</category></item><item><title>USB Redirector</title><link>http://community.sgdotnet.org/blogs/usoup/archive/2007/12/07/USB-Redirector.aspx</link><pubDate>Fri, 07 Dec 2007 12:25:21 GMT</pubDate><guid isPermaLink="false">9f588fb1-4571-42db-9419-e7c908124e96:172131</guid><dc:creator>usoup</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://community.sgdotnet.org/blogs/usoup/rsscomments.aspx?PostID=172131</wfw:commentRss><comments>http://community.sgdotnet.org/blogs/usoup/archive/2007/12/07/USB-Redirector.aspx#comments</comments><description>&lt;p&gt;Okay, I'm not going to debate on which 1 is better between &lt;a href="http://www.vmware.com/" target="_blank"&gt;VMWare&lt;/a&gt; and Virtual PC. But, if you used &lt;a href="http://www.microsoft.com/virtualization/default.mspx" target="_blank"&gt;Virtual PC&lt;/a&gt;, one of the limitation is that the virtual machine can't recognise the USB port that we have on the host machine. Well, if you insist to be religiously devoted to Virtual PC, you can use &lt;a href="http://www.incentivespro.com/downloads.html" target="_blank"&gt;USB Redirector&lt;/a&gt;, a small application that allows one machine to &amp;quot;connect&amp;quot; to a remote USB port. Yeah, remote. Through a TCP/IP port. And not only limited to virtualization environment. Think of it as if you're connecting to a network printer.&lt;/p&gt;  &lt;p&gt;The catch? Well, it's not a freeware... Now where's my VMWare installer again.&lt;/p&gt;&lt;img src="http://community.sgdotnet.org/aggbug.aspx?PostID=172131" width="1" height="1"&gt;</description><category domain="http://community.sgdotnet.org/blogs/usoup/archive/tags/Utilities/default.aspx">Utilities</category></item><item><title>Back to BizTalk 2006 R2 RFID</title><link>http://community.sgdotnet.org/blogs/usoup/archive/2007/12/05/Back-to-BizTalk-2006-R2-RFID.aspx</link><pubDate>Wed, 05 Dec 2007 15:30:00 GMT</pubDate><guid isPermaLink="false">9f588fb1-4571-42db-9419-e7c908124e96:171715</guid><dc:creator>usoup</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://community.sgdotnet.org/blogs/usoup/rsscomments.aspx?PostID=171715</wfw:commentRss><comments>http://community.sgdotnet.org/blogs/usoup/archive/2007/12/05/Back-to-BizTalk-2006-R2-RFID.aspx#comments</comments><description>&lt;p&gt;Have been trying out the &lt;a href="http://www.microsoft.com/rfid" target="_blank"&gt;BizTalk 2006 R2 RFID&lt;/a&gt; for the past 2 days, I find that it &amp;quot;could&amp;quot; be a very powerful engine. Well, there&amp;#39;s still a lot of room for me to explore, and i&amp;#39;m still trying to make the sense of its existence yet (perhaps because it is something quite new, just like when &lt;a href="http://www.microsoft.com/biztalk" target="_blank"&gt;BizTalk server&lt;/a&gt; was introduced back in year 2000). But that shouldn&amp;#39;t stop your interest, if you would like to know more about it. So here it goes: What&amp;#39;s in the package?&lt;/p&gt;&lt;p&gt;To get started, perhaps we&amp;#39;ll need a little bit of clarification. Similar to &lt;a href="http://biztalk.net/Default.aspx" target="_blank"&gt;BizTalk Services&lt;/a&gt; that i &lt;a href="http://community.sgdotnet.org/blogs/usoup/archive/2007/06/07/BizTalk-Service.aspx" target="_blank"&gt;mentioned&lt;/a&gt; before, BizTalk 2006 R2 RFID is a &lt;u&gt;stand-alone&lt;/u&gt; application, although it&amp;#39;s packaged within BTS 2006 R2. That means, you do not need&amp;nbsp;a BizTalk Server to start with! (And all the while I was trying to get a copy of BTS 2006 R2 just to test on its RFID &lt;img src="http://community.sgdotnet.org/emoticons/emotion-10.gif" alt="Embarrassed" /&gt;) But, BizTalk 2006 R2 RFID &lt;u&gt;can&lt;/u&gt; leverage on some features of BizTalk Server 2006, namely the powerful yet cryptic &lt;a href="http://blogs.msdn.com/biztalkbre/" target="_blank"&gt;Business Rule Engine&lt;/a&gt;&amp;nbsp;and &lt;a href="https://blogs.msdn.com/scottwoo/archive/2005/05/24/421443.aspx" target="_blank"&gt;Business Activity Monitoring&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;So, without holding you back, view the end to end &lt;a href="mms://wm.microsoft.com/ms/biztalk/RFID_Supply_Chain_Demo.wmv" target="_blank"&gt;demo&lt;/a&gt; scenario, go download the trials (that means the BTS 2006 R2), look for the samples, case studies, try it out! If possible, get the RFID readers and some tags. There are a few low cost providers (will try to find Singapore based). But, should you not be able to get a reader, that shouldn&amp;#39;t stop you, as using the RFID Manager, you can simulate a RFID reader. Cool huh!&lt;/p&gt;&lt;p&gt;I&amp;#39;ll post a few more of it later on. I&amp;#39;ll need to re-composing my thoughts first. :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://community.sgdotnet.org/aggbug.aspx?PostID=171715" width="1" height="1"&gt;</description><category domain="http://community.sgdotnet.org/blogs/usoup/archive/tags/BizTalk/default.aspx">BizTalk</category><category domain="http://community.sgdotnet.org/blogs/usoup/archive/tags/RFID/default.aspx">RFID</category></item><item><title>Next Datetime, please</title><link>http://community.sgdotnet.org/blogs/usoup/archive/2007/10/26/Next-Datetime_2C00_-please.aspx</link><pubDate>Fri, 26 Oct 2007 06:25:52 GMT</pubDate><guid isPermaLink="false">9f588fb1-4571-42db-9419-e7c908124e96:156082</guid><dc:creator>usoup</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://community.sgdotnet.org/blogs/usoup/rsscomments.aspx?PostID=156082</wfw:commentRss><comments>http://community.sgdotnet.org/blogs/usoup/archive/2007/10/26/Next-Datetime_2C00_-please.aspx#comments</comments><description>&lt;p&gt;Have you ever be given a task to use SQL Server T-SQL to find out the date value of next day, at 00 hour? Say, now is '2007-10-26 13:30:50', and you need to get a '2007-10-27 00:00:00'?&lt;/p&gt;  &lt;p&gt;Naturally, I think most of us will do something like this:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p class="MsoNormal" style="mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;color:blue;font-family:;"&gt;declare&lt;/span&gt;&lt;span style="font-size:10pt;font-family:;"&gt; @today &lt;span style="color:blue;"&gt;datetime         &lt;p&gt;&lt;/p&gt;       &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style="mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;color:blue;font-family:;"&gt;declare&lt;/span&gt;&lt;span style="font-size:10pt;font-family:;"&gt; @tomorrow &lt;span style="color:blue;"&gt;datetime         &lt;p&gt;&lt;/p&gt;       &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style="mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;color:blue;font-family:;"&gt;       &lt;p&gt;&lt;/p&gt;     &lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style="mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;color:blue;font-family:;"&gt;set&lt;/span&gt;&lt;span style="font-size:10pt;font-family:;"&gt; @today &lt;span style="color:gray;"&gt;=&lt;/span&gt; &lt;span style="color:fuchsia;"&gt;convert&lt;/span&gt;&lt;span style="color:gray;"&gt;(&lt;/span&gt;&lt;span style="color:blue;"&gt;datetime&lt;/span&gt;&lt;span style="color:gray;"&gt;,&lt;/span&gt; &lt;span style="color:fuchsia;"&gt;convert&lt;/span&gt;&lt;span style="color:gray;"&gt;(&lt;/span&gt;&lt;span style="color:blue;"&gt;nvarchar&lt;/span&gt;&lt;span style="color:gray;"&gt;(&lt;/span&gt;4&lt;span style="color:gray;"&gt;),&lt;/span&gt; &lt;span style="color:fuchsia;"&gt;datepart&lt;/span&gt;&lt;span style="color:gray;"&gt;(&lt;/span&gt;yyyy&lt;span style="color:gray;"&gt;,&lt;/span&gt; &lt;span style="color:fuchsia;"&gt;getdate&lt;/span&gt;&lt;span style="color:gray;"&gt;()))&lt;/span&gt; &lt;span style="color:gray;"&gt;+&lt;/span&gt; &lt;span style="color:fuchsia;"&gt;convert&lt;/span&gt;&lt;span style="color:gray;"&gt;(&lt;/span&gt;&lt;span style="color:blue;"&gt;nvarchar&lt;/span&gt;&lt;span style="color:gray;"&gt;(&lt;/span&gt;2&lt;span style="color:gray;"&gt;),&lt;/span&gt; &lt;span style="color:fuchsia;"&gt;datepart&lt;/span&gt;&lt;span style="color:gray;"&gt;(&lt;/span&gt;mm&lt;span style="color:gray;"&gt;,&lt;/span&gt; &lt;span style="color:fuchsia;"&gt;getdate&lt;/span&gt;&lt;span style="color:gray;"&gt;()))&lt;/span&gt; &lt;span style="color:gray;"&gt;+&lt;/span&gt; &lt;span style="color:fuchsia;"&gt;convert&lt;/span&gt;&lt;span style="color:gray;"&gt;(&lt;/span&gt;&lt;span style="color:blue;"&gt;nvarchar&lt;/span&gt;&lt;span style="color:gray;"&gt;(&lt;/span&gt;2&lt;span style="color:gray;"&gt;),&lt;/span&gt; &lt;span style="color:fuchsia;"&gt;datepart&lt;/span&gt;&lt;span style="color:gray;"&gt;(&lt;/span&gt;dd&lt;span style="color:gray;"&gt;,&lt;/span&gt; &lt;span style="color:fuchsia;"&gt;getdate&lt;/span&gt;&lt;span style="color:gray;"&gt;())))         &lt;p&gt;&lt;/p&gt;       &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style="mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;color:blue;font-family:;"&gt;set&lt;/span&gt;&lt;span style="font-size:10pt;font-family:;"&gt; @tomorrow &lt;span style="color:gray;"&gt;=&lt;/span&gt; &lt;span style="color:fuchsia;"&gt;dateadd&lt;/span&gt;&lt;span style="color:gray;"&gt;(&lt;/span&gt;dd&lt;span style="color:gray;"&gt;,&lt;/span&gt; 1&lt;span style="color:gray;"&gt;,&lt;/span&gt; @today&lt;span style="color:gray;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p class="MsoNormal" style="mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;font-family:;"&gt;&lt;span style="color:gray;"&gt;       &lt;p&gt;&lt;font face="Verdana" color="#a2a2a2"&gt;A lot of &lt;span style="color:fuchsia;"&gt;datepart &lt;/span&gt;and &lt;span style="color:fuchsia;"&gt;convert &lt;/span&gt;involved just to get the day/month/year value. There is a much simpler way actually, considering that datetime internal value is in fact numeric.&lt;/font&gt;&lt;/p&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p class="MsoNormal" style="mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;color:blue;font-family:;"&gt;declare&lt;/span&gt;&lt;span style="font-size:10pt;font-family:;"&gt; @today &lt;span style="color:blue;"&gt;datetime         &lt;p&gt;&lt;/p&gt;       &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style="mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;color:blue;font-family:;"&gt;declare&lt;/span&gt;&lt;span style="font-size:10pt;font-family:;"&gt; @tomorrow &lt;span style="color:blue;"&gt;datetime         &lt;p&gt;&lt;/p&gt;       &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style="mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;color:blue;font-family:;"&gt;       &lt;p&gt;&lt;/p&gt;     &lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style="mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;color:blue;font-family:;"&gt;set&lt;/span&gt;&lt;span style="font-size:10pt;font-family:;"&gt; @today &lt;span style="color:gray;"&gt;=&lt;/span&gt; &lt;span style="color:fuchsia;"&gt;convert&lt;/span&gt;&lt;span style="color:gray;"&gt;(&lt;/span&gt;&lt;span style="color:blue;"&gt;bigint&lt;/span&gt;&lt;span style="color:gray;"&gt;,&lt;/span&gt; &lt;span style="color:fuchsia;"&gt;dateadd&lt;/span&gt;&lt;span style="color:gray;"&gt;(&lt;/span&gt;hh&lt;span style="color:gray;"&gt;,&lt;/span&gt; &lt;span style="color:gray;"&gt;-&lt;/span&gt;12&lt;span style="color:gray;"&gt;,&lt;/span&gt; &lt;span style="color:fuchsia;"&gt;getdate&lt;/span&gt;&lt;span style="color:gray;"&gt;()))         &lt;p&gt;&lt;/p&gt;       &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:;"&gt;set&lt;/span&gt;&lt;span style="font-size:10pt;font-family:;"&gt; @tomorrow &lt;span style="color:gray;"&gt;=&lt;/span&gt; &lt;span style="color:fuchsia;"&gt;dateadd&lt;/span&gt;&lt;span style="color:gray;"&gt;(&lt;/span&gt;dd&lt;span style="color:gray;"&gt;,&lt;/span&gt; 1&lt;span style="color:gray;"&gt;,&lt;/span&gt; @today&lt;span style="color:gray;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p class="MsoNormal" style="mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;font-family:;"&gt;&lt;span style="color:gray;"&gt;       &lt;p&gt;&lt;font face="Verdana" color="#a2a2a2"&gt;Note the part that convert datetime to bigint. That's where the rounding took place. Let's step back a little bit and see how that works.&lt;/font&gt;&lt;/p&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p class="MsoNormal" style="mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;color:blue;font-family:;"&gt;select&lt;/span&gt;&lt;span style="font-size:10pt;font-family:;"&gt; &lt;span style="color:fuchsia;"&gt;getdate&lt;/span&gt;&lt;span style="color:gray;"&gt;()&lt;/span&gt; &lt;span style="color:blue;"&gt;as&lt;/span&gt; datetimeType&lt;span style="color:gray;"&gt;,&lt;/span&gt; &lt;span style="color:fuchsia;"&gt;convert&lt;/span&gt;&lt;span style="color:gray;"&gt;(&lt;/span&gt;&lt;span style="color:blue;"&gt;bigint&lt;/span&gt;&lt;span style="color:gray;"&gt;,&lt;/span&gt; &lt;span style="color:fuchsia;"&gt;getdate&lt;/span&gt;&lt;span style="color:gray;"&gt;())&lt;/span&gt; &lt;span style="color:blue;"&gt;as&lt;/span&gt; bigintType&lt;span style="color:gray;"&gt;,&lt;/span&gt; &lt;span style="color:fuchsia;"&gt;convert&lt;/span&gt;&lt;span style="color:gray;"&gt;(&lt;/span&gt;&lt;span style="color:blue;"&gt;decimal&lt;/span&gt;&lt;span style="color:gray;"&gt;(&lt;/span&gt;18&lt;span style="color:gray;"&gt;,&lt;/span&gt;12&lt;span style="color:gray;"&gt;),&lt;/span&gt; &lt;span style="color:fuchsia;"&gt;getdate&lt;/span&gt;&lt;span style="color:gray;"&gt;())&lt;/span&gt; &lt;span style="color:blue;"&gt;as&lt;/span&gt; decimalType        &lt;p&gt;&lt;/p&gt;     &lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;     &lt;p&gt;&amp;#xA0;&lt;/p&gt;   &lt;/p&gt;    &lt;p class="MsoNormal" style="mso-layout-grid-align:none;"&gt;&lt;span style="font-size:8pt;font-family:;"&gt;datetimeType&lt;span style="mso-spacerun:yes;"&gt;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0; &lt;/span&gt;bigintType&lt;span style="mso-spacerun:yes;"&gt;&amp;#xA0;&lt;/span&gt;decimalType        &lt;p&gt;&lt;/p&gt;     &lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style="mso-layout-grid-align:none;"&gt;&lt;span style="font-size:8pt;font-family:;"&gt;------------&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0; ---------- -----------&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style="mso-layout-grid-align:none;"&gt;&lt;span style="font-size:8pt;font-family:;"&gt;2007-10-26 13:50:27.560 39380&lt;span style="mso-spacerun:yes;"&gt;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0; &lt;/span&gt;39379.576707870372        &lt;p&gt;&lt;/p&gt;     &lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style="mso-layout-grid-align:none;"&gt;&lt;span style="font-size:8pt;font-family:;"&gt;       &lt;p&gt;&amp;#xA0;&lt;/p&gt;     &lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size:8pt;font-family:;"&gt;(1 row(s) affected)&lt;/span&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p class="MsoNormal" style="mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;font-family:;"&gt;&lt;span style="color:gray;"&gt;       &lt;p&gt;&lt;font face="Verdana" color="#a2a2a2"&gt;From the SQL query above, we can see that a datetime can be converted to decimal type. The numbers on the left hand side of the &amp;quot;.&amp;quot; denotes the number of &lt;u&gt;days&lt;/u&gt; since &amp;quot;1900-01-01 00:00:00&amp;quot;. The ones on the right hand side denotes the fraction of milliseconds in a day. That means, &amp;quot;1.0&amp;quot; means 1 day, means 24 hour, means 1440 minutes, means 86400 seconds, means 86400000 milliseconds. That means, this query below:&lt;/font&gt;&lt;/p&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:;"&gt;select&lt;/span&gt;&lt;span style="font-size:10pt;font-family:;"&gt; &lt;span style="color:fuchsia;"&gt;convert&lt;/span&gt;&lt;span style="color:gray;"&gt;(&lt;/span&gt;&lt;span style="color:blue;"&gt;datetime&lt;/span&gt;&lt;span style="color:gray;"&gt;,&lt;/span&gt; &lt;span style="color:gray;"&gt;(&lt;/span&gt;&lt;span style="color:fuchsia;"&gt;convert&lt;/span&gt;&lt;span style="color:gray;"&gt;(&lt;/span&gt;&lt;span style="color:blue;"&gt;decimal&lt;/span&gt;&lt;span style="color:gray;"&gt;(&lt;/span&gt;18&lt;span style="color:gray;"&gt;,&lt;/span&gt;12&lt;span style="color:gray;"&gt;),&lt;/span&gt; @tomorrow&lt;span style="color:gray;"&gt;)&lt;/span&gt; &lt;span style="color:gray;"&gt;+&lt;/span&gt; &lt;span style="color:gray;"&gt;(&lt;/span&gt;2.0000000000000&lt;span style="color:gray;"&gt;/&lt;/span&gt;24&lt;span style="color:gray;"&gt;)))&lt;/span&gt; &lt;span style="color:blue;"&gt;as&lt;/span&gt; tom_2am        &lt;p&gt;&lt;/p&gt;     &lt;/span&gt;&lt;/p&gt; &lt;/blockquote&gt; is equivalent to &amp;quot;&lt;span style="font-size:8pt;mso-no-proof:yes;"&gt;2007-10-27 02:00:00.000&amp;quot;. &lt;font face="Verdana" size="2"&gt;Cool huh? But of course, the query below:&lt;/font&gt;&lt;/span&gt;  &lt;blockquote&gt;   &lt;p class="MsoNormal" style="mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;font-family:;"&gt;&lt;span style="color:gray;"&gt;         &lt;p&gt;&lt;font face="Courier New" color="#666666"&gt;&lt;span style="font-size:10pt;color:blue;font-family:;"&gt;select&lt;/span&gt;&lt;span style="font-size:10pt;font-family:;"&gt; &lt;span style="color:fuchsia;"&gt;dateadd&lt;/span&gt;&lt;span style="color:gray;"&gt;(&lt;/span&gt;hh&lt;span style="color:gray;"&gt;,&lt;/span&gt; 2&lt;span style="color:gray;"&gt;,&lt;/span&gt; @tomorrow&lt;span style="color:gray;"&gt;)&lt;/span&gt; &lt;span style="color:blue;"&gt;as&lt;/span&gt; tom_2am&lt;/span&gt; &lt;/font&gt;&lt;/p&gt;       &lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p class="MsoNormal" style="mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;font-family:;"&gt;&lt;span style="color:gray;"&gt;       &lt;p&gt;&lt;font face="Verdana" color="#666666"&gt;is a lot easier to understand. :D&lt;/font&gt;&lt;/p&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;font-family:;"&gt;&lt;span style="color:gray;"&gt;       &lt;p&gt;&lt;font face="Verdana" color="#666666"&gt;Oh? Why &amp;quot;&lt;span style="color:fuchsia;"&gt;dateadd&lt;/span&gt;&lt;span style="color:gray;"&gt;(&lt;/span&gt;hh&lt;span style="color:gray;"&gt;,&lt;/span&gt; &lt;font color="#808080"&gt;-&lt;/font&gt;12&lt;span style="color:gray;"&gt;,&lt;/span&gt; &lt;span style="color:fuchsia;"&gt;getdate&lt;/span&gt;&lt;span style="color:gray;"&gt;())&lt;/span&gt;&amp;quot;, you ask? That's because of the rounding during conversion to bigint. So, let's see a few time during the day:&lt;/font&gt;&lt;/p&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;table cellspacing="0" cellpadding="2"&gt;     &lt;tr&gt;       &lt;td&gt;         &lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:;"&gt;select&lt;/span&gt;&lt;span style="font-size:10pt;font-family:;"&gt; &lt;span style="color:fuchsia;"&gt;convert&lt;/span&gt;&lt;span style="color:gray;"&gt;(&lt;/span&gt;&lt;span style="color:blue;"&gt;decimal&lt;/span&gt;&lt;span style="color:gray;"&gt;(&lt;/span&gt;18&lt;span style="color:gray;"&gt;,&lt;/span&gt;12&lt;span style="color:gray;"&gt;),&lt;/span&gt;&lt;/span&gt;@dt)&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;decimal(18,12)&lt;/td&gt;        &lt;td&gt;bigint&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;2007-10-26 00:00:00&lt;/td&gt;        &lt;td&gt;39379.000000000000&lt;/td&gt;        &lt;td&gt;39379&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;2007-10-26 03:00:00&lt;/td&gt;        &lt;td&gt;39379.125000000000&lt;/td&gt;        &lt;td&gt;39379&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;2007-10-26 12:00:00&lt;/td&gt;        &lt;td&gt;39379.500000000000&lt;/td&gt;        &lt;td&gt;39380&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;2007-10-26 15:00:00&lt;/td&gt;        &lt;td&gt;39379.625000000000&lt;/td&gt;        &lt;td&gt;39380&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;2007-10-27 00:00:00&lt;/td&gt;        &lt;td&gt;39380.000000000000&lt;/td&gt;        &lt;td&gt;39380&lt;/td&gt;     &lt;/tr&gt;   &lt;/table&gt;  &lt;p&gt;Any time before 12 noon on the day (&amp;lt; 0.5 in numeric) will be rounded down. Any other time will be rounded up. So, if we want to get today at mid night time value, we will need a source range from yesterday noon to today before noon, that can be rounded to today midnight. Hence, the &amp;quot;-12 hours&amp;quot; above.&lt;/p&gt;  &lt;p&gt;&amp;#xA0;&lt;/p&gt;  &lt;p class="MsoNormal" style="mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;font-family:;"&gt;&lt;span style="color:gray;"&gt;       &lt;p&gt;&lt;font face="Verdana" color="#a2a2a2"&gt;PS: I have always wanted to write about this, but since I don't think it'll make any much difference to programming, I've always canceled writing this. Until I asked myself, &amp;quot;how worse can writing this be?&amp;quot;, and I don't have the answer. :D If you have a better ways of doing this, please let us know.&lt;/font&gt;&lt;/p&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;img src="http://community.sgdotnet.org/aggbug.aspx?PostID=156082" width="1" height="1"&gt;</description><category domain="http://community.sgdotnet.org/blogs/usoup/archive/tags/How-To/default.aspx">How-To</category></item></channel></rss>