C# Class DataConn, zcw

DataConn 的摘要说明
Inheritance: System.Web.UI.Page
Exibir arquivo Open project: jerrytan/zcw Class Usage Examples

Public Properties

Property Type Description
conn string

Public Methods

Method Description
Close ( ) : void

关闭数据库

DBLook ( string strSQL ) : string

执行SQL语句,取出SQL语句的第一行第一列的值

DataConn ( ) : System

Connection 构造函数

DataPile ( string strsql, DataSet objset, string strtable ) : void
ExeSQLGetID ( string strSQL ) : int

执行操作型SQL,并返回自动增值ID

ExecuteDBSQL ( string DBName, string str_Sql, bool blnClose ) : bool

先设置当前数据库,再执行SQL语句,并返回是否成功

ExecuteProc ( ) : bool

执行存储过程

ExecuteProcForTable ( string strProcName, SqlParameter coll ) : DataTable

执行存储过程返回datatable

ExecuteSQL ( SqlCommand cmd, bool blnClose ) : bool

执行SQL语句,并返回是否成功

ExecuteSQL ( string str_Sql, bool blnClose ) : bool

执行SQL语句,并返回是否成功

ExecuteSQLForCount ( string str_Sql, bool blnClose ) : int

执行SQL语句,并返回影响的行数

GetConnStr ( string DBName ) : string

根据数据库名返回数据库连接字符串的

GetDataSet ( string strSQL ) : DataSet

建立DataSet对象,用记录填充或构架(如果必要)DataSet对象,DataSet即是数据在内存的缓存,并返回

GetDataSet ( string strSQL, SqlParameter coll ) : DataSet

建立DataSet对象,用记录填充或构架(如果必要)DataSet对象,DataSet即是数据在内存的缓存,并返回

GetDataTable ( string strSQL ) : DataTable

返回指定查询SQL的DataTable对象

GetDataTable ( string strSQL, SqlParameter coll ) : DataTable

返回指定查询SQL的DataTable对象

GetDataView ( string strSQL ) : DataView

获得dataview

GetRowCount ( string strSQL ) : int

获得符合该Sql语句的表记录数

GetRowCount ( string strSQL, SqlParameter coll ) : int

获得符合该Sql语句的表记录数

GetRows ( string strSQL ) : System.Data.DataRowCollection

获得包含在DataSet对象的映谢表集合中的index为0的映谢表

GetRows ( string strSQL, SqlParameter coll ) : System.Data.DataRowCollection

获得包含在DataSet对象的映谢表集合中的index为0的映谢表

GetWebConfigValue ( string sPara ) : string

取出配置文件中的指定值

MsgBox ( Page webform, string msg ) : void

简单提示框 20140318 小张添加

OpenDB ( ) : void

和数据库建立连接

RunSqlTransaction ( string sSQL ) : bool

执行事物

SaveFileToImage ( string strSQL, string DBName, byte byFileData ) : bool

把字节流存到数据库

sqlDataReader ( string strSQL ) : System.Data.SqlClient.SqlDataReader

Method Details

Close() public method

关闭数据库
public Close ( ) : void
return void

DBLook() public method

执行SQL语句,取出SQL语句的第一行第一列的值
public DBLook ( string strSQL ) : string
strSQL string 要执行的SQL语句
return string

DataConn() public method

Connection 构造函数
public DataConn ( ) : System
return System

DataPile() public method

public DataPile ( string strsql, DataSet objset, string strtable ) : void
strsql string
objset DataSet
strtable string
return void

ExeSQLGetID() public method

执行操作型SQL,并返回自动增值ID
public ExeSQLGetID ( string strSQL ) : int
strSQL string
return int

ExecuteDBSQL() public method

先设置当前数据库,再执行SQL语句,并返回是否成功
public ExecuteDBSQL ( string DBName, string str_Sql, bool blnClose ) : bool
DBName string
str_Sql string
blnClose bool
return bool

ExecuteProc() public method

执行存储过程
public ExecuteProc ( ) : bool
return bool

ExecuteProcForTable() public method

执行存储过程返回datatable
public ExecuteProcForTable ( string strProcName, SqlParameter coll ) : DataTable
strProcName string 存储过程名称
coll System.Data.SqlClient.SqlParameter 存储过程参数列表
return DataTable

ExecuteSQL() public method

执行SQL语句,并返回是否成功
public ExecuteSQL ( SqlCommand cmd, bool blnClose ) : bool
cmd SqlCommand
blnClose bool
return bool

ExecuteSQL() public method

执行SQL语句,并返回是否成功
public ExecuteSQL ( string str_Sql, bool blnClose ) : bool
str_Sql string
blnClose bool
return bool

ExecuteSQLForCount() public method

执行SQL语句,并返回影响的行数
public ExecuteSQLForCount ( string str_Sql, bool blnClose ) : int
str_Sql string
blnClose bool
return int

GetConnStr() public method

根据数据库名返回数据库连接字符串的
public GetConnStr ( string DBName ) : string
DBName string
return string

GetDataSet() public method

建立DataSet对象,用记录填充或构架(如果必要)DataSet对象,DataSet即是数据在内存的缓存,并返回
public GetDataSet ( string strSQL ) : DataSet
strSQL string
return DataSet

GetDataSet() public method

建立DataSet对象,用记录填充或构架(如果必要)DataSet对象,DataSet即是数据在内存的缓存,并返回
public GetDataSet ( string strSQL, SqlParameter coll ) : DataSet
strSQL string
coll System.Data.SqlClient.SqlParameter
return DataSet

GetDataTable() public method

返回指定查询SQL的DataTable对象
public GetDataTable ( string strSQL ) : DataTable
strSQL string
return DataTable

GetDataTable() public method

返回指定查询SQL的DataTable对象
public GetDataTable ( string strSQL, SqlParameter coll ) : DataTable
strSQL string
coll System.Data.SqlClient.SqlParameter
return DataTable

GetDataView() public method

获得dataview
public GetDataView ( string strSQL ) : DataView
strSQL string
return DataView

GetRowCount() public method

获得符合该Sql语句的表记录数
public GetRowCount ( string strSQL ) : int
strSQL string
return int

GetRowCount() public method

获得符合该Sql语句的表记录数
public GetRowCount ( string strSQL, SqlParameter coll ) : int
strSQL string
coll System.Data.SqlClient.SqlParameter
return int

GetRows() public method

获得包含在DataSet对象的映谢表集合中的index为0的映谢表
public GetRows ( string strSQL ) : System.Data.DataRowCollection
strSQL string
return System.Data.DataRowCollection

GetRows() public method

获得包含在DataSet对象的映谢表集合中的index为0的映谢表
public GetRows ( string strSQL, SqlParameter coll ) : System.Data.DataRowCollection
strSQL string
coll System.Data.SqlClient.SqlParameter
return System.Data.DataRowCollection

GetWebConfigValue() public method

取出配置文件中的指定值
public GetWebConfigValue ( string sPara ) : string
sPara string
return string

MsgBox() public method

简单提示框 20140318 小张添加
public MsgBox ( Page webform, string msg ) : void
webform Page
msg string
return void

OpenDB() public method

和数据库建立连接
public OpenDB ( ) : void
return void

RunSqlTransaction() public method

执行事物
public RunSqlTransaction ( string sSQL ) : bool
sSQL string
return bool

SaveFileToImage() public method

把字节流存到数据库
public SaveFileToImage ( string strSQL, string DBName, byte byFileData ) : bool
strSQL string sql语句
DBName string
byFileData byte 字节流
return bool

sqlDataReader() public method

public sqlDataReader ( string strSQL ) : System.Data.SqlClient.SqlDataReader
strSQL string
return System.Data.SqlClient.SqlDataReader

Property Details

conn public_oe static_oe property

public static string conn
return string