Click here to Skip to main content
15,886,755 members
Articles / Database Development / SQL Server

Database Helper Class Library to Ease Database Operation

Rate me:
Please Sign up or sign in to vote.
3.09/5 (9 votes)
14 Apr 2007CPOL4 min read 87.6K   3K   57  
Database Helper Class Library to Ease Database Operation
///////////////////////////////////////////////////////////////////////////
// Copyright 2003-2005 Falcon Soon
//
// Author: Soon Chun Boon
// Date: 22 Feb 2004
// Description: 
// Enumeration that represents type of criteria used when performs database
// operations, e.g. update and delete operations.
///////////////////////////////////////////////////////////////////////////

namespace DBHelper
{
	/// <summary>
	/// Specifies the criteria type for performing database operations.
	/// </summary>
	/// <example>
	/// <code>
	/// //Use primary key to delete records
    /// mobjTableHelper.CriteriaType = DBCriteria.UsePrimaryKey;
    /// mobjCnnProvider.OpenConnection();
    /// mobjTableHelper.Delete();
    /// mobjCnnProvider.CloseConnection();
	/// </code>
	/// </example>
	public enum DBCriteria
	{
        /// <summary>
        /// Specifies no criteria is used.
        /// </summary>
        None,
        /// <summary>
        /// Specifies primary key is used.
        /// </summary>
		UsePrimaryKey,
        /// <summary>
        /// Specifies filter expression is used.
        /// </summary>
        UseFilterExpression,
        /// <summary>
        /// Specifies primary key and filter expression is used.
        /// </summary>
        UseBoth
	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Malaysia Malaysia
Had worked as analyst programmer for 4 years. Now helping in family business but still involved actively in .Net development whenever there is a free time.

Comments and Discussions