Alan Moseley IT Consultancy

The Blog Page

4/8/2009 - How to take apart a Samsung R40 laptop

My task for today (or one of them anyway) was to stop a Samsung R40 laptop fan from making such a noise. Having never taken a Samsung apart, I looked for some resources, but found none. Usually most laptops take maybe twenty or thirty minutes to dismant  More ...

2/9/2009 - List all indexes for a table in SQL

Whilst trying to resolve performance issues on an SQL database, I needed to get a list of all indexes for a table. To do this, open the SQL Query Analyzer and type the following in the query window:- use databasename EXEC sp_helpindex 't  More ...

12/18/2008 - Session Variables Not Working In ASP Application

I had been developing an ASP application for a customer, which when running on IIS on my development workstation worked perfectly. I installed the application to a development server, which also worked fine. Finally I installed it to the production serv  More ...

11/5/2008 - Crystal Reports Supported HTML Tags And Attributes

After about two days of trying to beat a Crystal Report into submission, I found that if you need a field to display as HTML, the list of supported tags and attributes are VERY limited. The supported HTML tags are: html body div (causes a paragraph  More ...

10/17/2008 - SQL query to see which users are accessing databases

How do you allow a user to see which other users are accessing SQL databases without installing management consoles etc? Easy, write a report (using Crystal or Excel maybe) which connects to the server's 'master' database and use the following select sta  More ...

9/23/2008 - Passing an array to a user-defined function (UDF) in .NET from Excel

I am in the middle of converting some Excel UDFs into a .NET addin, and could not see how to pass an array from Excel to my add-in. The answer was to declare the array as an object rather than any other sort of variable:- Public Function MyFunction(ByV  More ...

7/25/2008 - How to SUM a range of cells based on multiple criteria

Let's say we have an Excel sheet containing the following: Column A - Year numbers Column B - Month numbers Column C - Sales figure How do you get the total sales for a specific year (say 2008) and month (say 4) into a cell? You cannot use vlookup as  More ...

6/19/2008 - Changing the backcolor of an MDI parent form

I recently discovered that it is not possible (from the form properties window) to change the backcolor of an MDI parent form. This is due to the fact that this colour is controlled from the MDIClient control, which is not visible from the designer in Vi  More ...

6/13/2008 - Confirm delete within an asp GridView control

The standard delete commandfield within a gridview control does not give the user any warning that the record is about to be deleted. The best way that I have found (so far) to display a warning is to run a little client-side script. Within the CommandFi  More ...

5/16/2008 - Accessing an SQL 2005 database if the database sa password has been reset

I came across the need to access some data within an SQL 2005 database (in order to back it up), where the sa password had been reset. This is how I did it:-

Logged to the server as a member of the local windows admin group
Stopped the
  More ...

5/12/2008 - How to determine the Excel cell from which a function was called

During the creation of an Excel user-defined function, I needed to determine which cell the function was being called from. The answer was to use the following line of code:- Application.Caller.Address   More ...

5/2/2008 - Setup project in Visual Studio 2005 with Crystal Reports

If you have created an application that includes a Crystal Report object, when you create the setup project for the application you will need to add the redistributable components for Crystal (see link at bottom of this blog entry). After you have ext  More ...

4/23/2008 - Exchange routing emails to junkmail@example.org

I was service packing an Exchange 2003 server today and noticed in the queues that Exchange had hundreds of emails queued up for 'junkmail@example.org'. As this is a reserved domain name I decided to investigate further. It turned out that also installed  More ...

3/16/2008 - New Feature

I am often encountering new technologies and concepts , and with this come new problems. I am providing this blog so that when I overcome these problems I can note the answer for others to hopefully learn from. If you have found an answer to one of your  More ...