Developer Resources for AbleCommerce eCommerce platform
CommerceBuilder.Utility Namespace / DbHelper Class / ColumnExists Method
the sql connection
Name of the table to look in
Name of the column to check for
In This Topic
    ColumnExists Method
    In This Topic
    Determines if a column exists within a database table
    Syntax
    public static bool ColumnExists( 
       SqlConnection connection,
       string tableName,
       string columnName
    )

    Parameters

    connection
    the sql connection
    tableName
    Name of the table to look in
    columnName
    Name of the column to check for

    Return Value

    True if the column exists within the table, false otherwise.
    Remarks
    This method assumes the table exists.
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also