Here’s a quick tip I was shown by a friendly Help Desk guy this week (thanks, Ben!).

Next time you get an error dialog from some random piece of software, don’t reach for a pen to write down the relevant details.

Sample Error Dialog

Instead, reach for the keyboard and press Control-C. That’s right, Copy the dialog. You’ll end up with the text of the dialog on the clipboard:

---------------------------
Microsoft SQL Server Login
---------------------------
Connection failed:
SQLState: '08001'
SQL Server Error: -1
[Microsoft][SQL Native Client]SQL Network Interfaces: Error Locating Server/Instance Specified [xFFFFFFFF].
Connection failed:
SQLState: 'HYT00'
SQL Server Error: 0
[Microsoft][SQL Native Client]Login timeout expired
Connection failed:
SQLState: '08001'
SQL Server Error: -1
[Microsoft][SQL Native Client]An error has occurred while establishing a
connection to the server. When connecting to SQL Server 2005, this failure may
be caused by the fact that under the default settings SQL Server does not
allow remote connections.

---------------------------
OK
--------------------------

Paste into your favourite text editor or into an email.

I’ve tested this in a number of applications myself and found it works on both XP and Vista. I’m guessing it’s tied with with the standard MessageDlg API.

Wish I knew this one years ago.

Comments

blog comments powered by Disqus