Justin Cooney

Web Development Tips and Examples

  • The syntax to query the system objects table has changed slightly from SQL Server 2000 to SQL Server 2008, but the useful data stored about your server objects is still very good to have access to. It’s worth noting that both DDL and DML trigger information is not stored in the system objects table, but can be viewed in sys.triggers.

    As an example, the syntax to query the system objects table in SQL Server 2008 is:

    SELECT * FROM sys.objects ORDER BY modify_date

    A similar query in SQL Server 2000 by contrast would go against the sysobjects table. Here is a SQL SErver 2000 query that looks through user created objects for ones starting with the text ‘AddressInfo’;

    (more…)

  • Crystal Reports XI R2 and Crystal Reports 9 incorrectly generate non-critical connection error logs when set to run reports from SQL Server 2008.

    Specifically, when Crystal Reports is connected to a SQL Server 2008 database it will serve the report correctly, but invisibly it will also generate an error log in SQL Server.

    Although insignificant for just one report, this clutters up the error logs for no reason when there are several hundred Crystal Reports all doing the same thing.

    Background:

    As part of modernizing our company database infrastructure we updated our database server from SQL Server 2000 to SQL Server 2008.

    (more…)

  • UDL files can be incredibly useful for a variety of reasons (please see my earlier post for details). In this article I will explain the steps for creating and configuring a UDL file.

    Creating a UDL file is quite straightforward. Here are the steps:

    1. First create a new text document in Windows Explorer and give a name to your new file, making sure you set the extension to .udl  (or you can open notepad and save it using .udl extension). Either way, make sure nothing is entered in the notepad document.
    2. Once you have created your new .udl file, the icon for your file should change from the icon for a text document to a special icon specific to .udl files
    3. Now double click your new .udl file in order to open it. (more…)