Category Archives: Programming

Blog about programming

Fixing Eclipse Unable to connect to repository error

When I tried to check for update on my Eclipse from Help > Check for Updates I got Unable to connect to repository error.

To fix this add the setting below on Eclipse’s eclipse.ini file:

Registering 32-bit DLL on Windows Server SBS 2008 64-bit

Recently I’m installing a 32-bit application on a fresh installed Windows Server SBS 2008 which only comes in 64-bit version. This application that I’m installing is requiring a DLL file to be registered on the registry using the regsvr32 command.

Here comes the problem with registering 32-bit DLL since 32-bit application see different “system32” in Windows Server 64-bit. 32-bit application will see %windir%\syswow64 as their “system32” directory in 64-bit OS, while 64-bit application will use the %windir%\system32.

So to register the 32-bit DLL on 64-bit Windows Server we need to call the 32-bit version of regsvr32 which located on %windir%\syswow64, for example:

KillSwitch .Net Software Protection

As software developers we want to make sure our client do pay our works. Most of the time the payment for a project is split into several phases, in the beginning, in middle or testing phase and on end of the project or delivery, with the big percentage of payment is received on the end of the project.

Sometimes client are late on payment or even worst they doesn’t pay at all. What you can do if you already deliver the software and they have it working fine? Buying encryption software might be not a solution for a freelancer or small developer as they cost thousands of dollars.

Continue reading KillSwitch .Net Software Protection

PHP Unable to Connect to MS SQL Server Express Edition

I’ve been struggling for several hours to find out why PHP 5.2.5 didn’t want to connect to MS SQL Server 2005 Express Edition although extension=php_mssql.dll already enabled and phpinfo() is showing MS SQL already active.

I always got this error messages when trying to connect to MS SQL:

After doing some searching, I got an answer that PHP 5 is using old ntwdblib.dll version. The one that comes with PHP 5.2.5 distribution is version 2000.2.8.0 which seems doesn’t compatible with the new MS SQL Server 2005 Express Edition. I downloaded new dll from (use the search tool) which is version 2000.80.194.0 and replaced the one on PHP folder with this version.

I use this code to test the connection and its working:

Importing Multiple CSV Files to MS Access Database

I got a task to convert a lot of .csv (Comma Separated File) files today. There are hundreds, 970 files to be exact :) of CSV files. MS Access does have feature to import CSV file to its table, but if you want to convert 970 files one by one, it will took a damn long boring time.

Luckily all the CSV files have the same column format, so what I need to do is find how to automate the process instead of doing it in barbaric way (convert it one by one). I know that this is doable with macro script.
Continue reading Importing Multiple CSV Files to MS Access Database

Problem Installing OSCommerce

I was trying to install OSCommerce on my laptop last Wednesday for a web shop project. I download the latest version of OSCommerce from their website here. The version that I downloaded is 2.2 MS 2.

I have Apache 2 web server, PHP 5 and MySQL 5 database server installed on my laptop, so I guess I’m ready to install OSCommerce. I’m totally wrong.. I read the installation guide and it seems so easy to install, you only need to point your browser to http://<domainname>/<oscommerce folder>/install/install.php

Continue reading Problem Installing OSCommerce

Sending Email with SMTP Authentication in C# .NET

On my current C# .NET project, the user wants to have the application send an email if a new data is being inserted to the database. I search on the MSDN for class that will do this task and I found SmtpMail class.

Using SmtpMail is very simple, first you need to add a reference on your project. You can do this by right clicking on ‘References’ and click ‘Add References’. On ‘.Net’ tab find ‘System.Web.dll’ and add it to your project.

Continue reading Sending Email with SMTP Authentication in C# .NET