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

    Parameters

    connection
    the sql connection
    tableName
    Name of the table
    indexName
    Name of the index to check for

    Return Value

    True if the index exists for 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