Archive for the ‘Software Development’ Category

Copy SQL Server database on same server

Monday, January 9th, 2012

Use the following instructions when you need to create a copy of an existing database on the same server.

- Create a backup of the existing database.
- Create the new database and select the task ‘Restore’
- Select the db backup file to restore, however as the backup is for another database on the existing server the option ‘Overwrite the existing database (WITH REPLACE)’ must be selected
- Before restoring the database, just check the filepaths where the database is being restored too!

Installing BeautifulSoup on Linux

Tuesday, September 13th, 2011

It’s as easy as:

sudo python setup.py install

Change start up form in C# application

Saturday, August 13th, 2011

To change the form that is launched when a C# application starts open the file Program.cs and change the class in the call to Application.Run() to the form that should be launched on start up.

Data recovery tool

Monday, August 8th, 2011

I still find TestDisk and PhotoRec - http://www.cgsecurity.org/ to be very useful tools when it comes to working with broken hard drive and data recovery

Extract windows msi and setup exe files

Monday, August 8th, 2011

I recently discovered that windows msi and setup exe files are actually rar files. You can therefore unpack them to view and modify the files used to install software.

C# DateTime arithmetic

Monday, August 8th, 2011

I will build up a list of useful datetime arithmetic operations .

  • Get datetime as of midnight for any DateTime value - example: DateTime.Now - DateTime.Now.TimeOfDay
  • Get a datetime object containing the first day of the current month - example: DateTime firstDayOfTheMonth = DateTime.Now.AddDays(-(DateTime.Now.Day-1)).Subtract(DateTime.Now.TimeOfDay)
  • Get a datetime object containing the last day of the current month - example: firstDayOfThisMonth.AddMonths(1).AddDays(-1)

C# Sort listview items

Thursday, August 4th, 2011

Sort items in a listview control. Use the column header click event to sort by the selected column and alternate between ascending and descending order. Provide the listview control’s sort() method with a customer comparer function to define the sort comparison function. For full details view…http://msdn.microsoft.com/en-us/library/ms996467.aspx

Sage import payroll

Thursday, August 4th, 2011

We have just completed a project with a client to automate the entering of month payroll data into Sage 50. This has greatly reduced the time and effort required for monthly payroll processing.

The solution is fully automated and runs in the background.

Sage import timesheets

Thursday, August 4th, 2011

We have just completed a project with a client to automate the entering of worker timesheets into Sage 50. This has greatly reduced the time and effort required for monthly payroll.

The solution is fully automated and runs in the background.

Sage website customers

Thursday, August 4th, 2011

We have just completed a project with a client to automate the entering of website customers into Sage 50. This has greatly reduced the time and effort required to keep an up-to-date set of accounts.

The solution is fully automated and runs in the background without interfering in the website’s processing.