﻿<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>onDevelopment+=1;</title>
    <description>Articles, tips, code snippets taken from my life as Software Developer.</description>
    <link>http://www.callicode.com/homeltpagegt/tabid/36/BlogId/1/Default.aspx</link>
    <language>en-US</language>
    <managingEditor>blogs@callicode.com</managingEditor>
    <webMaster>info@callicode.com</webMaster>
    <pubDate>Wed, 07 Jan 2009 03:14:20 GMT</pubDate>
    <lastBuildDate>Wed, 07 Jan 2009 03:14:20 GMT</lastBuildDate>
    <docs>http://backend.userland.com/rss</docs>
    <generator>Blog RSS Generator Version 3.2.0.29758</generator>
    <item>
      <title>About the error: The name ... does not exist in the current context</title>
      <description>&lt;P&gt;&lt;FONT face=Verdana size=2&gt;When you try to compile in .Net 2.0 (and up) web pages created using .NET 1.1 and automatically migrated by Visual Studio you may receive an error like this: &lt;BR&gt;&lt;FONT color=#ff0000&gt;The name "SampleControl" does not exist in the current context.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;If you try to declare the control in your code-behind file you will receive the following error: &lt;BR&gt;&lt;FONT color=#ff0000&gt;The type "SamplePage" already contains a definition for "SampleControl".&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;The solution is very simple - but hard to find - and involves making the Page class partial and moving all control declarations to a .designer file.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;This can be done automatically with the following steps:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;FONT face=Verdana size=2&gt;1- Right click on the .aspx file for the codebehind file that doesn't compile.&lt;BR&gt;2- Choose the 'Convert to Web Application' option.&lt;BR&gt;&lt;BR&gt;This will create a .designer file, and the page will compile.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <link>http://www.callicode.com/homeltpagegt/tabid/36/EntryID/16/Default.aspx</link>
      <author>blogs@callicode.com</author>
      <comments>http://www.callicode.com/homeltpagegt/tabid/36/EntryID/16/Default.aspx#Comments</comments>
      <guid isPermaLink="true">http://www.callicode.com/Default.aspx?tabid=36&amp;EntryID=16</guid>
      <pubDate>Thu, 03 Jul 2008 05:00:00 GMT</pubDate>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.callicode.com/DesktopModules/Blog/Trackback.aspx?id=16</trackback:ping>
    </item>
    <item>
      <title>Reading about Design Patterns </title>
      <description>&lt;FONT face=Verdana size=2&gt;Last week I found this &lt;/FONT&gt;&lt;A href="http://sourcemaking.com/design-patterns-and-tips" target=_blank&gt;&lt;FONT face=Verdana size=2&gt;site&lt;/FONT&gt;&lt;/A&gt;&lt;A href="http://sourcemaking.com/design-patterns-and-tips"&gt;&lt;FONT face=Verdana size=2&gt; &lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt;on &lt;/FONT&gt;&lt;FONT face=Verdana size=2&gt;digg.com&lt;/FONT&gt;&lt;FONT face=Verdana size=2&gt; it caught my attention and since I was busy at that moment I saved it on my &lt;/FONT&gt;&lt;A href="http://del.icio.us/" target=_blank&gt;&lt;FONT face=Verdana size=2&gt;del.icio.us&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt; bookmarks to check it out later.&lt;BR&gt;&lt;BR&gt;This Sunday I had an extra free time - since there is not much to do outside when it feels like -28C outside - and decided to go back to the article.&lt;BR&gt;&lt;BR&gt;Well this is excellent reference material for any developer/software architect. The video tutorials are excellent and guide you step by step in understanding and implementing the given pattern.&lt;BR&gt;&lt;BR&gt;Here is the link to the article: &lt;/FONT&gt;&lt;A href="http://sourcemaking.com/design-patterns-and-tips"&gt;&lt;FONT face=Verdana size=2&gt;http://sourcemaking.com/design-patterns-and-tips&lt;/FONT&gt;&lt;/A&gt;</description>
      <link>http://www.callicode.com/homeltpagegt/tabid/36/EntryID/14/Default.aspx</link>
      <author>blogs@callicode.com</author>
      <comments>http://www.callicode.com/homeltpagegt/tabid/36/EntryID/14/Default.aspx#Comments</comments>
      <guid isPermaLink="true">http://www.callicode.com/Default.aspx?tabid=36&amp;EntryID=14</guid>
      <pubDate>Sun, 10 Feb 2008 05:00:00 GMT</pubDate>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.callicode.com/DesktopModules/Blog/Trackback.aspx?id=14</trackback:ping>
    </item>
    <item>
      <title>Say goodbye to HTML tables</title>
      <description>&lt;p&gt;&lt;font size="2" face="Verdana"&gt;This month while involved on the redesign of a very popular website I decided not to use HTML tables anymore - or at least avoid its use as much as possible. Ten years ago - when I started building websites - Tables were your friends not your foe. Along came &lt;a href="http://www.w3.org/Style/CSS/" target="_blank"&gt;CSS&lt;/a&gt;&lt;a href="http://www.w3.org/Style/CSS/"&gt; &lt;/a&gt;and the idea of separating the content from the way it is presented.&lt;br&gt; &lt;br&gt;&lt;a href="http://www.w3.org/Style/CSS/" target="_blank"&gt;CSS&lt;/a&gt; is been around for a while and almost all the sites currently use it somehow but do they use it well? Check out &lt;a href="http://www.csszengarden.com/" target="_blank"&gt;CSS Zen Garden&lt;/a&gt;&lt;a href="http://www.csszengarden.com/"&gt; &lt;/a&gt;and decide if your site allows being re-skinned as much as this site.&lt;br&gt;&lt;br&gt;It’s been an excellent experience and I’ll be posting some tips about how to build CSS-friendly sites in the future. &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana"&gt;&lt;br&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/font&gt; &lt;/p&gt;</description>
      <link>http://www.callicode.com/homeltpagegt/tabid/36/EntryID/15/Default.aspx</link>
      <author>blogs@callicode.com</author>
      <comments>http://www.callicode.com/homeltpagegt/tabid/36/EntryID/15/Default.aspx#Comments</comments>
      <guid isPermaLink="true">http://www.callicode.com/Default.aspx?tabid=36&amp;EntryID=15</guid>
      <pubDate>Wed, 30 Jan 2008 05:00:00 GMT</pubDate>
      <slash:comments>1</slash:comments>
      <trackback:ping>http://www.callicode.com/DesktopModules/Blog/Trackback.aspx?id=15</trackback:ping>
    </item>
    <item>
      <title>How to enable CURL for PHP on Windows</title>
      <description>&lt;font face="Verdana" size="2"&gt;These are the steps that worked for me:&lt;br&gt;&lt;/font&gt;&lt;ol&gt;&lt;li&gt;&lt;font face="Verdana" size="2"&gt;Uncommented the line "extension=php_curl.dll" in php.ini file.&lt;/font&gt;&lt;/li&gt;&lt;li&gt;&lt;font face="Verdana" size="2"&gt;Copied libeay32.dll and ssleay32.dll to C:\WINDOWS\system32. &lt;/font&gt;&lt;/li&gt;&lt;/ol&gt;&lt;font face="Verdana" size="2"&gt;Note that these two dlls can be found on the PHP folder under the &lt;i&gt;dlls &lt;/i&gt;folder. Adding this folder to the Windows PATH variable should also work. &lt;br&gt;&lt;br&gt;You can use this simple test script - which retrieves and displays yahoo.com homepage - to verify that CURL is now working:&lt;br&gt;&lt;br&gt;&lt;font color="#0000ff" face="Courier New"&gt;&lt;?php&lt;br&gt;$ch = curl_init("http://www.yahoo.com/");&lt;br&gt;curl_setopt($ch, CURLOPT_HEADER, 0);&lt;br&gt;curl_exec($ch);&lt;br&gt;curl_close($ch);&lt;br&gt;?&gt;&lt;/font&gt;&lt;/font&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</description>
      <link>http://www.callicode.com/homeltpagegt/tabid/36/EntryID/13/Default.aspx</link>
      <author>blogs@callicode.com</author>
      <comments>http://www.callicode.com/homeltpagegt/tabid/36/EntryID/13/Default.aspx#Comments</comments>
      <guid isPermaLink="true">http://www.callicode.com/Default.aspx?tabid=36&amp;EntryID=13</guid>
      <pubDate>Tue, 08 Jan 2008 05:00:00 GMT</pubDate>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.callicode.com/DesktopModules/Blog/Trackback.aspx?id=13</trackback:ping>
    </item>
    <item>
      <title>SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified</title>
      <description>&lt;P&gt;&lt;FONT face=Verdana size=2&gt;This error kept me busy all morning and part of the afternoon:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;FONT color=#ff0000&gt;An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)&lt;/FONT&gt; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;FONT face=Verdana size=2&gt;This error seems to be affecting more developers - according to some forums and blogs - but none of them had a solution.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;FONT face=Verdana size=2&gt;After trying some workarounds I finally found one that worked: &lt;BR&gt;&lt;BR&gt;&lt;STRONG&gt;The SQL port - 1433 -  needs to be included as part of Data Source on the connection string:&lt;BR&gt;&lt;/STRONG&gt;&lt;BR&gt;&lt;STRONG&gt;...Data Source=mysqlserver\instance1,1433;...&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P align=left&gt;&lt;FONT face=Verdana size=2&gt;That did it for me.&lt;/FONT&gt;&lt;/P&gt;
&lt;P align=left&gt;&lt;FONT face=Verdana size=2&gt;Note that the error was happening when connecting to a &lt;STRONG&gt;SQL Server 2000&lt;/STRONG&gt; from a &lt;STRONG&gt;.NET 2.0 web application&lt;/STRONG&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P align=left&gt;&lt;FONT face=Verdana size=2&gt;I'm not sure the real cause of this problem or why it was happening in the first place.&lt;/FONT&gt;&lt;/P&gt;
&lt;P align=left&gt;&lt;FONT face=Verdana size=2&gt;I also posted my workaround on the following forums:&lt;BR&gt;&lt;A href="http://blogs.msdn.com/sql_protocols/archive/2007/03/31/named-pipes-provider-error-40-could-not-open-a-connection-to-sql-server.aspx?CommentPosted=true#commentmessage"&gt;http://blogs.msdn.com/sql_protocols/archive/2007/03/31/named-pipes-provider-error-40-could-not-open-a-connection-to-sql-server.aspx?CommentPosted=true#commentmessage&lt;/A&gt;&lt;BR&gt;&lt;A href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2475976&amp;SiteID=1&amp;mode=1"&gt;http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2475976&amp;SiteID=1&amp;mode=1&lt;/A&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/SPAN&gt;</description>
      <link>http://www.callicode.com/homeltpagegt/tabid/36/EntryID/12/Default.aspx</link>
      <author>blogs@callicode.com</author>
      <comments>http://www.callicode.com/homeltpagegt/tabid/36/EntryID/12/Default.aspx#Comments</comments>
      <guid isPermaLink="true">http://www.callicode.com/Default.aspx?tabid=36&amp;EntryID=12</guid>
      <pubDate>Wed, 28 Nov 2007 05:00:00 GMT</pubDate>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.callicode.com/DesktopModules/Blog/Trackback.aspx?id=12</trackback:ping>
    </item>
    <item>
      <title>How to convert from SAS date format to SQL datetime</title>
      <description>&lt;P&gt;&lt;FONT face=Verdana size=2&gt;I was asked how to convert SAS dates to SQL datetimes. Most of the time all it takes is simple Google search to find the solution for requests like this one, well not this time.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;I created a function that do the conversion and wanted to share it with you all :-)&lt;/FONT&gt;&lt;/P&gt;
&lt;DIV dir=ltr align=left&gt;&lt;SPAN class=479031418-01112007&gt;&lt;FONT face=Verdana size=2&gt;&lt;SPAN class=479031418-01112007&gt;This is how you use the function:&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV dir=ltr align=left&gt;&lt;SPAN class=479031418-01112007&gt;&lt;FONT face=Verdana size=2&gt;&lt;SPAN class=479031418-01112007&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/SPAN&gt; &lt;/DIV&gt;
&lt;DIV dir=ltr align=left&gt;&lt;SPAN class=479031418-01112007&gt;&lt;FONT size=2&gt;&lt;SPAN class=479031418-01112007&gt;&lt;FONT face=Verdana&gt;&lt;FONT color=#0000ff&gt;&lt;FONT size=2&gt;select&lt;/FONT&gt;&lt;FONT size=2&gt; dbo&lt;/FONT&gt;&lt;FONT size=2&gt;.Convert&lt;/FONT&gt;&lt;FONT size=2&gt;SASDate&lt;/FONT&gt;&lt;FONT size=2&gt;(&lt;/FONT&gt;&lt;FONT size=2&gt;'12DEC2006:15:15:11.000'&lt;/FONT&gt;&lt;FONT size=2&gt;)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV dir=ltr align=left&gt;&lt;SPAN class=479031418-01112007&gt;&lt;FONT size=2&gt;&lt;SPAN class=479031418-01112007&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/SPAN&gt; &lt;/DIV&gt;
&lt;DIV dir=ltr align=left&gt;&lt;SPAN class=479031418-01112007&gt;&lt;FONT size=2&gt;&lt;SPAN class=479031418-01112007&gt;&lt;FONT face=Verdana size=2&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/SPAN&gt; &lt;/DIV&gt;
&lt;DIV dir=ltr align=left&gt;&lt;SPAN class=479031418-01112007&gt;&lt;FONT size=2&gt;&lt;SPAN class=479031418-01112007&gt;&lt;FONT size=2&gt;&lt;FONT face=Verdana&gt;Here is the function:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV dir=ltr align=left&gt;&lt;SPAN class=479031418-01112007&gt;&lt;FONT size=2&gt;&lt;SPAN class=479031418-01112007&gt;&lt;FONT size=2&gt;&lt;FONT face=Verdana&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/SPAN&gt; &lt;/DIV&gt;
&lt;DIV dir=ltr align=left&gt;&lt;SPAN class=479031418-01112007&gt;&lt;FONT size=2&gt;&lt;SPAN class=479031418-01112007&gt;&lt;FONT size=2&gt;&lt;FONT face=Verdana color=#0000ff&gt;SET ANSI_NULLS ON&lt;BR&gt;GO&lt;BR&gt;SET QUOTED_IDENTIFIER ON&lt;BR&gt;GO&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face=Verdana color=#0000ff&gt;&lt;/FONT&gt; &lt;/DIV&gt;
&lt;DIV dir=ltr align=left&gt;&lt;SPAN class=479031418-01112007&gt;&lt;FONT size=2&gt;&lt;SPAN class=479031418-01112007&gt;&lt;FONT size=2&gt;&lt;FONT face=Verdana color=#0000ff&gt;CREATE FUNCTION dbo.Convert&lt;FONT size=2&gt;SASDate&lt;/FONT&gt;&lt;BR&gt;(&lt;BR&gt; @SASDate varchar(50)&lt;BR&gt;)&lt;BR&gt;RETURNS datetime&lt;BR&gt;AS&lt;BR&gt;BEGIN&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face=Verdana color=#0000ff&gt;&lt;/FONT&gt; &lt;/DIV&gt;
&lt;DIV dir=ltr align=left&gt;&lt;SPAN class=479031418-01112007&gt;&lt;FONT size=2&gt;&lt;SPAN class=479031418-01112007&gt;&lt;FONT size=2&gt;&lt;FONT face=Verdana color=#0000ff&gt; -- convert SAS format to european datetime format (dd mon yyyy hh:mm:ss:mmm)&lt;BR&gt; DECLARE @EuropeDate varchar(50)&lt;BR&gt; SET @EuropeDate = substring(@SASDate, 1, 2) -- dd&lt;BR&gt;     + ' '        -- space&lt;BR&gt;     + substring(@SASDate, 3, 3) -- mon&lt;BR&gt;     + ' '        -- space&lt;BR&gt;     + substring(@SASDate, 6, 4) -- yyyy&lt;BR&gt;     + ' '        -- space&lt;BR&gt;     + substring(@SASDate, 11, 2) -- hh&lt;BR&gt;     + ':'        -- :&lt;BR&gt;     + substring(@SASDate, 14, 2)-- mm&lt;BR&gt;     + ':'        -- :&lt;BR&gt;     + substring(@SASDate, 17, 2)-- ss&lt;BR&gt;     + ':'        -- :&lt;BR&gt;     + substring(@SASDate, 20, 3) -- mmm&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face=Verdana color=#0000ff&gt;&lt;/FONT&gt; &lt;/DIV&gt;
&lt;DIV dir=ltr align=left&gt;&lt;SPAN class=479031418-01112007&gt;&lt;FONT size=2&gt;&lt;SPAN class=479031418-01112007&gt;&lt;FONT size=2&gt;&lt;FONT face=Verdana color=#0000ff&gt; -- parse european format&lt;BR&gt; return convert(datetime, @EuropeDate, 113)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face=Verdana color=#0000ff&gt;&lt;/FONT&gt; &lt;/DIV&gt;
&lt;DIV dir=ltr align=left&gt;&lt;SPAN class=479031418-01112007&gt;&lt;FONT size=2&gt;&lt;SPAN class=479031418-01112007&gt;&lt;FONT size=2&gt;&lt;FONT face=Verdana color=#0000ff&gt;END&lt;BR&gt;GO&lt;/FONT&gt;&lt;/DIV&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/SPAN&gt;</description>
      <link>http://www.callicode.com/homeltpagegt/tabid/36/EntryID/11/Default.aspx</link>
      <author>blogs@callicode.com</author>
      <comments>http://www.callicode.com/homeltpagegt/tabid/36/EntryID/11/Default.aspx#Comments</comments>
      <guid isPermaLink="true">http://www.callicode.com/Default.aspx?tabid=36&amp;EntryID=11</guid>
      <pubDate>Thu, 01 Nov 2007 05:00:00 GMT</pubDate>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.callicode.com/DesktopModules/Blog/Trackback.aspx?id=11</trackback:ping>
    </item>
    <item>
      <title>How to reset the MySQL root user privileges on Windows</title>
      <description>&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Follow these steps to reset the MySQL root user privileges on Windows:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;1- Stop the MySQL service &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;2- Open a command prompt and run the following command:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;FONT color=#0000ff&gt;D:\MySQL\MySQL Server 4.1\bin&gt;mysqld-nt --skip-grant-tables&lt;/FONT&gt; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;3- Open a new command prompt and connect to the mysqld server with this command:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#0000ff size=2&gt;D:\MySQL\MySQL Server 4.1\bin&gt;mysql -u root&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;4- Issue the following statements in the mysql client:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#0000ff size=2&gt;mysql&gt; FLUSH PRIVILEGES;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#0000ff size=2&gt;mysql&gt; USE mysql;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#0000ff size=2&gt;mysql&gt; REPLACE INTO user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#0000ff size=2&gt;mysql&gt; REPLACE INTO user VALUES ('%','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#0000ff size=2&gt;mysql&gt; quit;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;5- Open the windows task manager and kill the process with name mysqld-nt.exe&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;6- Start the MySQL service and now you will have the root privileges back :-)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;&lt;FONT face=Verdana size=2&gt;Note: This article assumes that MySQL was installed on "D:\MySQL\MySQL Server 4.1"&lt;/FONT&gt;&lt;/P&gt;</description>
      <link>http://www.callicode.com/homeltpagegt/tabid/36/EntryID/10/Default.aspx</link>
      <author>blogs@callicode.com</author>
      <comments>http://www.callicode.com/homeltpagegt/tabid/36/EntryID/10/Default.aspx#Comments</comments>
      <guid isPermaLink="true">http://www.callicode.com/Default.aspx?tabid=36&amp;EntryID=10</guid>
      <pubDate>Tue, 23 Oct 2007 05:00:00 GMT</pubDate>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.callicode.com/DesktopModules/Blog/Trackback.aspx?id=10</trackback:ping>
    </item>
    <item>
      <title>Creating COM+ applications using .NET</title>
      <description>&lt;P&gt;&lt;FONT face=Verdana size=2&gt;I remember that some time ago I had the need to interact with a library written in .NET from MS SQL 2000. Creating a COM+ object using managed code was the first thing that came to my mind (I had done it before using C++). I googled it for a little bit but couldn't find the right way to get this done and since I was really in a hurry ended up creating a simple console application that was called using &lt;/FONT&gt;&lt;A href="http://www.sqlservercentral.com/columnists/hji/usingxp_cmdshell.asp" target=_blank&gt;&lt;FONT face=Verdana size=2&gt;xp_cmdshell&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Today I had the time to revisit this issue and this time in less than 1 minute the right article came on top of my search results: &lt;EM&gt;Microsoft Enterprise Services allows you to create Microsoft COM+ applications using the .NET Framework&lt;/EM&gt;. &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;This is the article that explains this process in details:&lt;BR&gt;&lt;/FONT&gt;&lt;A href="http://support.microsoft.com/kb/306296"&gt;&lt;FONT face=Verdana size=2&gt;http://support.microsoft.com/kb/306296&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;How to invoke COM applications from SQL?&lt;BR&gt;&lt;/FONT&gt;&lt;A href="http://www.sqlservercentral.com/columnists/dasanka/callingcomfromtsql.asp"&gt;&lt;FONT face=Verdana size=2&gt;http://www.sqlservercentral.com/columnists/dasanka/callingcomfromtsql.asp&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;</description>
      <link>http://www.callicode.com/homeltpagegt/tabid/36/EntryID/9/Default.aspx</link>
      <author>blogs@callicode.com</author>
      <comments>http://www.callicode.com/homeltpagegt/tabid/36/EntryID/9/Default.aspx#Comments</comments>
      <guid isPermaLink="true">http://www.callicode.com/Default.aspx?tabid=36&amp;EntryID=9</guid>
      <pubDate>Fri, 24 Aug 2007 05:00:00 GMT</pubDate>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.callicode.com/DesktopModules/Blog/Trackback.aspx?id=9</trackback:ping>
    </item>
    <item>
      <title>How to select unique key values from a "key pool"</title>
      <description>&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Imagine the following scenario: The table defined below is populated with "key values" available to a given application. These values are generated by other application and inserted in batches from time to time into this "key pool" table.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;/* Create table */&lt;BR&gt;CREATE TABLE [KeyPool](&lt;BR&gt;[KeyPoolId] [int] IDENTITY(1,1) NOT NULL,&lt;BR&gt;[Key] [varchar](30) NOT NULL,&lt;BR&gt;[IsUsed] [bit] NOT NULL&lt;BR&gt;CONSTRAINT [PK_KeyPool] PRIMARY KEY CLUSTERED &lt;BR&gt;([KeyPoolId] ASC))&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;/* Insert test values */&lt;BR&gt;INSERT INTO [KeyPool] ([Key], [IsUsed]) VALUES ('KEY00001',0)&lt;BR&gt;INSERT INTO [KeyPool] ([Key], [IsUsed]) VALUES ('KEY00002',0)&lt;BR&gt;INSERT INTO [KeyPool] ([Key], [IsUsed]) VALUES ('KEY00002',0)&lt;BR&gt;INSERT INTO [KeyPool] ([Key], [IsUsed]) VALUES ('KEY00003',0)&lt;BR&gt;INSERT INTO [KeyPool] ([Key], [IsUsed]) VALUES ('KEY00004',0)&lt;BR&gt;INSERT INTO [KeyPool] ([Key], [IsUsed]) VALUES ('KEY00005',0)&lt;BR&gt;INSERT INTO [KeyPool] ([Key], [IsUsed]) VALUES ('KEY00006',0)&lt;BR&gt;INSERT INTO [KeyPool] ([Key], [IsUsed]) VALUES ('KEY00007',0)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;How you select a unique key from this table and also marking it as "used" so is not returned again. Given the current conditions, around 5 different processes may be requesting a value at the same time.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;One possible solution is:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#0000ff size=2&gt;DECLARE @Key VARCHAR(30)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#0000ff size=2&gt;BEGIN TRANSACTION&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#0000ff size=2&gt;SELECT TOP 1 @Key=[Key] &lt;BR&gt;FROM [KeyPool] WITH (UPDLOCK, HOLDLOCK) /* This lock will persist until the transaction is commited */&lt;BR&gt;WHERE IsUsed = 0 &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#0000ff size=2&gt;UPDATE [KeyPool]&lt;BR&gt;SET IsUsed = 1&lt;BR&gt;WHERE [Key]=@Key&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#0000ff size=2&gt;COMMIT&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;FONT color=#0000ff&gt;SELECT @Key&lt;/FONT&gt; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Note that this solution is designed to work with a "key pool" table which contains 1 million rows and around 5000 new values are added every week.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;This approach works but I'm not sure if there is better way to solve this problem... any ideas?&lt;/FONT&gt;&lt;/P&gt;</description>
      <link>http://www.callicode.com/homeltpagegt/tabid/36/EntryID/8/Default.aspx</link>
      <author>blogs@callicode.com</author>
      <comments>http://www.callicode.com/homeltpagegt/tabid/36/EntryID/8/Default.aspx#Comments</comments>
      <guid isPermaLink="true">http://www.callicode.com/Default.aspx?tabid=36&amp;EntryID=8</guid>
      <pubDate>Tue, 14 Aug 2007 04:00:00 GMT</pubDate>
      <slash:comments>1</slash:comments>
      <trackback:ping>http://www.callicode.com/DesktopModules/Blog/Trackback.aspx?id=8</trackback:ping>
    </item>
    <item>
      <title>How to convert an object to a string (and back)</title>
      <description>Shows how to convert an object to a byte array using the binary formater and then encoding the resulting byte array to a Base64-encoded System.String.</description>
      <link>http://www.callicode.com/homeltpagegt/tabid/36/EntryID/7/Default.aspx</link>
      <author>blogs@callicode.com</author>
      <comments>http://www.callicode.com/homeltpagegt/tabid/36/EntryID/7/Default.aspx#Comments</comments>
      <guid isPermaLink="true">http://www.callicode.com/Default.aspx?tabid=36&amp;EntryID=7</guid>
      <pubDate>Mon, 30 Jul 2007 04:00:00 GMT</pubDate>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.callicode.com/DesktopModules/Blog/Trackback.aspx?id=7</trackback:ping>
    </item>
  </channel>
</rss>