C# Class StockWebApp.DBUtility.DbHelperSQL

���ݷ��ʳ�������� Copyright (C) 2004-2008 By LiTianPing
ファイルを表示 Open project: AillsonWei/niusouyixia

Public Properties

Property Type Description
connectionString string

Public Methods

Method Description
ColumnExists ( string tableName, string columnName ) : bool

�ж��Ƿ����ij���ij���ֶ�

DbHelperSQL ( ) : System
ExecuteReader ( string strSQL ) : System.Data.SqlClient.SqlDataReader

ִ�в�ѯ��䣬����SqlDataReader ( ע�⣺���ø÷�����һ��Ҫ��SqlDataReader����Close )

ExecuteSql ( string SQLString ) : int

ִ��SQL��䣬����Ӱ��ļ�¼��

ExecuteSql ( string SQLString, string content ) : int

ִ�д�һ���洢���̲����ĵ�SQL��䡣

ExecuteSqlByTime ( string SQLString, int Times ) : int
ExecuteSqlGet ( string SQLString, string content ) : object

ִ�д�һ���洢���̲����ĵ�SQL��䡣

ExecuteSqlInsertImg ( string strSQL, byte fs ) : int

�����ݿ������ͼ���ʽ���ֶ�(������������Ƶ���һ��ʵ��)

ExecuteSqlTran ( List SQLStringList ) : int

ִ�ж���SQL��䣬ʵ�����ݿ�����

ExecuteSqlTran ( Hashtable SQLStringList ) : void

ִ�ж���SQL��䣬ʵ�����ݿ�����

ExecuteSqlTranWithIndentity ( Hashtable SQLStringList ) : void

ִ�ж���SQL��䣬ʵ�����ݿ�����

Exists ( string strSql ) : bool
GetMaxID ( string FieldName, string TableName ) : int
GetSingle ( string SQLString ) : object

ִ��һ�������ѯ�����䣬���ز�ѯ�����object����

GetSingle ( string SQLString, int Times ) : object
Query ( string SQLString ) : DataSet

ִ�в�ѯ��䣬����DataSet

Query ( string SQLString, int Times ) : DataSet
RunProcedure ( string storedProcName, IDataParameter parameters, string tableName ) : DataSet

ִ�д洢����

RunProcedure ( string storedProcName, IDataParameter parameters, string tableName, int Times ) : DataSet
RunProcedure ( string storedProcName, IDataParameter parameters ) : System.Data.SqlClient.SqlDataReader

ִ�д洢���̣�����SqlDataReader ( ע�⣺���ø÷�����һ��Ҫ��SqlDataReader����Close )

RunProcedure ( string storedProcName, IDataParameter parameters, int &rowsAffected ) : int

ִ�д洢���̣�����Ӱ�������

TabExists ( string TableName ) : bool

���Ƿ����

Private Methods

Method Description
BuildIntCommand ( SqlConnection connection, string storedProcName, IDataParameter parameters ) : SqlCommand

���� SqlCommand ����ʵ��(��������һ������ֵ)

BuildQueryCommand ( SqlConnection connection, string storedProcName, IDataParameter parameters ) : SqlCommand

���� SqlCommand ����(��������һ���������������һ������ֵ)

PrepareCommand ( SqlCommand cmd, SqlConnection conn, SqlTransaction trans, string cmdText, SqlParameter cmdParms ) : void

Method Details

ColumnExists() public static method

�ж��Ƿ����ij���ij���ֶ�
public static ColumnExists ( string tableName, string columnName ) : bool
tableName string ������
columnName string ������
return bool

DbHelperSQL() public method

public DbHelperSQL ( ) : System
return System

ExecuteReader() public static method

ִ�в�ѯ��䣬����SqlDataReader ( ע�⣺���ø÷�����һ��Ҫ��SqlDataReader����Close )
public static ExecuteReader ( string strSQL ) : System.Data.SqlClient.SqlDataReader
strSQL string ��ѯ���
return System.Data.SqlClient.SqlDataReader

ExecuteSql() public static method

ִ��SQL��䣬����Ӱ��ļ�¼��
public static ExecuteSql ( string SQLString ) : int
SQLString string SQL���
return int

ExecuteSql() public static method

ִ�д�һ���洢���̲����ĵ�SQL��䡣
public static ExecuteSql ( string SQLString, string content ) : int
SQLString string SQL���
content string ��������,����һ���ֶ��Ǹ�ʽ���ӵ����£���������ţ�����ͨ�������ʽ���
return int

ExecuteSqlByTime() public static method

public static ExecuteSqlByTime ( string SQLString, int Times ) : int
SQLString string
Times int
return int

ExecuteSqlGet() public static method

ִ�д�һ���洢���̲����ĵ�SQL��䡣
public static ExecuteSqlGet ( string SQLString, string content ) : object
SQLString string SQL���
content string ��������,����һ���ֶ��Ǹ�ʽ���ӵ����£���������ţ�����ͨ�������ʽ���
return object

ExecuteSqlInsertImg() public static method

�����ݿ������ͼ���ʽ���ֶ�(������������Ƶ���һ��ʵ��)
public static ExecuteSqlInsertImg ( string strSQL, byte fs ) : int
strSQL string SQL���
fs byte ͼ���ֽ�,���ݿ���ֶ�����Ϊimage�����
return int

ExecuteSqlTran() public static method

ִ�ж���SQL��䣬ʵ�����ݿ�����
public static ExecuteSqlTran ( List SQLStringList ) : int
SQLStringList List ����SQL���
return int

ExecuteSqlTran() public static method

ִ�ж���SQL��䣬ʵ�����ݿ�����
public static ExecuteSqlTran ( Hashtable SQLStringList ) : void
SQLStringList System.Collections.Hashtable SQL���Ĺ�ϣ���keyΪsql��䣬value�Ǹ�����SqlParameter[]��
return void

ExecuteSqlTranWithIndentity() public static method

ִ�ж���SQL��䣬ʵ�����ݿ�����
public static ExecuteSqlTranWithIndentity ( Hashtable SQLStringList ) : void
SQLStringList System.Collections.Hashtable SQL���Ĺ�ϣ���keyΪsql��䣬value�Ǹ�����SqlParameter[]��
return void

Exists() public static method

public static Exists ( string strSql ) : bool
strSql string
return bool

GetMaxID() public static method

public static GetMaxID ( string FieldName, string TableName ) : int
FieldName string
TableName string
return int

GetSingle() public static method

ִ��һ�������ѯ�����䣬���ز�ѯ�����object����
public static GetSingle ( string SQLString ) : object
SQLString string �����ѯ������
return object

GetSingle() public static method

public static GetSingle ( string SQLString, int Times ) : object
SQLString string
Times int
return object

Query() public static method

ִ�в�ѯ��䣬����DataSet
public static Query ( string SQLString ) : DataSet
SQLString string ��ѯ���
return System.Data.DataSet

Query() public static method

public static Query ( string SQLString, int Times ) : DataSet
SQLString string
Times int
return System.Data.DataSet

RunProcedure() public static method

ִ�д洢����
public static RunProcedure ( string storedProcName, IDataParameter parameters, string tableName ) : DataSet
storedProcName string �洢������
parameters IDataParameter �洢���̲���
tableName string DataSet����еı���
return System.Data.DataSet

RunProcedure() public static method

public static RunProcedure ( string storedProcName, IDataParameter parameters, string tableName, int Times ) : DataSet
storedProcName string
parameters IDataParameter
tableName string
Times int
return System.Data.DataSet

RunProcedure() public static method

ִ�д洢���̣�����SqlDataReader ( ע�⣺���ø÷�����һ��Ҫ��SqlDataReader����Close )
public static RunProcedure ( string storedProcName, IDataParameter parameters ) : System.Data.SqlClient.SqlDataReader
storedProcName string �洢������
parameters IDataParameter �洢���̲���
return System.Data.SqlClient.SqlDataReader

RunProcedure() public static method

ִ�д洢���̣�����Ӱ�������
public static RunProcedure ( string storedProcName, IDataParameter parameters, int &rowsAffected ) : int
storedProcName string �洢������
parameters IDataParameter �洢���̲���
rowsAffected int Ӱ�������
return int

TabExists() public static method

���Ƿ����
public static TabExists ( string TableName ) : bool
TableName string
return bool

Property Details

connectionString public_oe static_oe property

public static string connectionString
return string