Restore SQL Server 2005 Master Database

[SQL Server 2005 master Database Download 700 KB] You are running SQL Server 2005, your master database has got corrupted because of sudden power failure or other reasons. The SQL Server will not start. You have tried registry setting, playing with changing protocol, disabled via protocol but nothing worked. Do do not have backup of the masters, there is no way you can start your server, you are on the versge of loosing all you precious data. Do not panic, you can recover it by copying a fresh master.mdf file but there are tricks so please read on. 1. The…

Read More

How to Add SQL Server Connection in Crystal Report

I worked in Crystal Report for quite a while but even I got confused how to add SQL Connection when I installed Crystal Reports on a new sytem. Basically there were no existing connections under any of the options and it was not every intuitive how to add a connection string. 1. Simply double click OLE DB (ADO) 2. This will popup a dialog, go to the very bottom in the list and choose SQL Server Native Client. That’s it! Check the checkbox for integrated security and select  your server. You should be all set.  

Read More

Attendance Summary Report on LIMTON TIS

Here is quick SQL query that generates employee’s monthly attendance report on Limton TIS. Getting Department and Designation names was a bit tricky as they are not named as such. They are placed inside HRTCompanyLogicDetail table.

This report does contain on query from my own database. Basically were are combining attendance report from TIS and our own attendance system.

Read More

convert parameter to int in Stimulsoft mrt

You can use standard C# function in Stimulsoft .MRT report although I have not seen them in documents as such. For example if you want to add two parameter values in Stimulsoft MRT Report, you will have to convert them to integer first. By default they are of “Object” type. In the following example, I am converting @Month object into an integer. It must first be converted to string using ToString() and then use Int32.Parse() function to convert it.

This variable can then be added to another variable (concatenation) as Int32.Parse(DataSource1.Parameters[“@num1”].ParameterValue.ToString()) + Int32.Parse(DataSource1.Parameters[“@numb”].ParameterValue.ToString())

Read More

Error occured while loading attendance from database – Hanvon

In Hanvon FaceID Manager, If you go to “Transaction View” and you select “from date” to “to date” when loading data it might spit out this error Error occured while loading attendance from database If you fire up SQL Server management studio and look at the logs (under Maintenance > SQL Server Log and double clicking the current log and then selecting “Windows NT” checkbox at left), you will see this error Stack Trace: at DataAccess.clsDataAccessBaseForMSAccess.ExecuteDataTable() at DataAccess.HanvonFaceIDPolling.clsPolling.GetAttendanceRecords(String rstrDateTimeFrom, String rstrDateTimeTo) at HanvonFaceIDManager.frmListDotDatGenerator.LoadDataFromDB(enDateRange miDateRange) The error message is clearly about ill formatted date. However my date format seems to be…

Read More

Redirect in PHP not working

is generally enough to redirect your page but most of the time it does not work because it requires that no data should be sent to the client before the header, or rather header should be the first thing sent to the client. To fix that problem using PHP Buffering

Note that in some case even this might not work. The reason is likely something was already sent to the client before the header. Typical example would be an add-in in the browser which injects some javascript into the page. If that is the case, redirect will not…

Read More

Looping through gridview in C# always return empty

I had a gridview which was bounded to a datasource (datatable in my case) in code behind in C#. Code was something like this

This was always returning empty (”) no matter which column index I was pointing to. I tried different variations like

but it failed too. After pondering on it for quite a while and still not resolved, I decided to loop through the data source itself, in my case a datatable. That actually worked! That code looks like this

I am still not sure why it will not read the values from GridView in…

Read More

excel add title to chart

Tutorial on how to add title to Excel Chart 1. Click on Excel Chart 2. Chart Tool appears in the ribbon bar. 3. In the “Design” TAB, “Chart Layout” group, select the first one which contains title. 4. Title will appear in your chart. Simply edit the title. Done.

Read More