Wednesday, October 24, 2012

How To Connect To Informix Database Using Squirrel SQL Client

Hi readers,

In this post I will show you how to connect to Informix database using Squirrel SQL client. First thing we gonna need is:

1. Squirrel SQL Client

Squirrel SQL client is written in Java language so obviously you need to have Java installed in your machine. Once installed, you can proceed to download Squirrel SQL client from HERE. Run the installer and follow the on screen instructions.

2. Check Necessary Requirements
Run the Squirrel SQL client. Go to 'Drivers' tab. Check whether there is blue check mark next to 'Informix'. 

If there is no blue check mark, most probably you don't have the extra class for Informix.
Go HERE to download the extra class. Extract the zip file to get the jar archive.

If there is no Informix driver at all, do install the driver first. Get it from HERE. Run the setup.exe and follow the instructions.

If you see blue check mark, do proceed with step number 4.

3. Configure Extra Class Path

Right click on Informix, select Modify option. Click on Extra Class Path tab, click Add and point to the jar file. Dont forget to fill your database information in Example URL. Click Open, then OK.

4. Configure Aliases
 
Go to aliases tab, click plus sign to add new alias. Give a name for your new alias and choose Informix driver. Automatically the URL will be filled out. Make sure it is correct. Fill in your database username and password. Click Test to test the connection. If everything goes well, you can connect to your database straight away.

Friday, October 19, 2012

Crystal Report: Convert Total Seconds to HH:MM:SS Format


Lets say the total seconds is 6214:

NumberVar TotalSec :=  6214;
NumberVar Hours   := Truncate  (Remainder ( TotalSec , 86400) / 3600) ;
NumberVar Minutes := Truncate  (Remainder ( TotalSec , 3600) / 60) ;
NumberVar Seconds := Remainder (TotalSec , 60) ;
Totext ( Hours ,   '00' ) +  ':' +
Totext ( Minutes , '00' ) +  ':' +
Totext ( Seconds , '00' )