Markus Blog What’s going on Internet?

1Apr/100

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:

C:\Windows\SysWOW64\regsvr32.exe <name of 32-bit DLL>.dll
Tagged as: No Comments
18Sep/091

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.

2Jun/087

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:

Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: (local)\SQLEXPRESS in path\mssql.php on line 5

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 http://webzila.com (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:

 
echo("Testing MS SQL connection... ");
 
if ($conn = mssql_connect('(local)\SQLEXPRESS', 'user', 'pass'))
{
    echo("Connection succeed");
 
    mssql_select_db('dbname', $conn);
    mssql_close($conn);
}
else
{
    echo("Connection failed");
}
Tagged as: , 7 Comments
4Jul/072

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.

31May/072

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

5Apr/075

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.

31Mar/074

Switch Case in SQL

Usually when designing a database I often use an integer to save values that represent a string. To make it clear see table below:

Name

Role ID

Markus

1

Jose

2

Anonymous

3

On the table above I use integers to represent role id names, 1 = ‘Administrator’, 2 = ‘User’, 3 = ‘Guest’.

20Sep/060

Crystal Report’s Failed To Load Report

I spend half time of today’s working hours just to do some research on how to solve a problem that happen on software that currently being worked by other team. The software that they currently do is having problem when it’s being run on Microsoft Windows 98. It producing an error that nobody knows what is the cause.

At first we suspect that Crystal Report is causing the problem because some Windows XP that also having the same problem can be fixed by installing Crystal Report component from Visual Studio .NET 2003 installation CDs. But it’s not the case for Windows 98. I can’t install the Crystal Report component from Visual Studio installation CDs, I even can’t run the setup program :(

Page 1 of 212