自用DBClass SQLServer数据库操作类

using System;
using System.Data;
using System.Data.SqlClient;
using System.Collections.Generic;
using System.Reflection;

/// <summary>
/// DBClass : SQL Server 数据库 操作类
/// </summary>
/// <remarks>
/// </remarks>
/// <history>
///     xx. YYYY/MM/DD   VER     AUTHOR      COMMENTS        
///      1. 2008/03/04           Free        CREATE
/// </history>


public class DBClass
{
    SqlConnection theSqlConnection 
= new SqlConnection();

    
得到数据库连接字串

    
运行Select查询 得到一个DataSet

    
运行查询 得到DataTable

    
运行非Select的Insert或Update或Delete语句 成功返回true 否则返回false

}

 

posted on 2008-03-13 10:30  freeliver54  阅读(1115)  评论(6编辑  收藏  举报

导航