C# Class Hamekoz.Data.DB

Data Base access class
Show file Open project: hamekoz/hamekoz-sharp Class Usage Examples

Public Methods

Method Description
PrintProviderFactoryClasses ( ) : void
SP ( string sp ) : int
SPToDataSet ( DataSet dataset, string sp ) : DataSet
SPToDataSet ( string sp ) : DataSet
SPToDbDataReader ( string sp ) : System.Data.Common.DbDataReader
SPToScalar ( string sp ) : object
SetInstancia ( DB db ) : void
Sql ( string sql ) : int
SqlToDataSet ( DataSet dataset, string sql ) : DataSet
SqlToDataSet ( string sql ) : DataSet
SqlToDbDataReader ( string sql ) : System.Data.Common.DbDataReader

Qwery database with sql string and return a DbDataReader

Must wrap this method with using sentence

SqlToScalar ( string sql ) : object

Private Methods

Method Description
Conectar ( ) : bool
Desconectar ( ) : void
RegistrarError ( Exception error ) : void

Registrar los errores generados al intentar realizar las consultas.

cargarParametros ( DbCommand comando, object parametros ) : void

Asigna los parametros al comando de acuerdo al motor utilizado

crearComando ( TipoComando tipo, string cadenaSql ) : DbCommand
ejecutarDataReader ( TipoComando tipo, string cadenaSql ) : System.Data.Common.DbDataReader
ejecutarDataSet ( TipoComando tipo, string cadenaSql ) : DataSet
ejecutarDataSet ( DataSet dataset, TipoComando tipo, string cadenaSql ) : void
ejecutarProceso ( TipoComando tipo, string cadenaSql ) : int
ejecutarScalar ( TipoComando tipo, string cadenaSql ) : object

Method Details

PrintProviderFactoryClasses() public static method

public static PrintProviderFactoryClasses ( ) : void
return void

SP() public method

public SP ( string sp ) : int
sp string
return int

SPToDataSet() public method

public SPToDataSet ( DataSet dataset, string sp ) : DataSet
dataset System.Data.DataSet
sp string
return System.Data.DataSet

SPToDataSet() public method

public SPToDataSet ( string sp ) : DataSet
sp string
return System.Data.DataSet

SPToDbDataReader() public method

public SPToDbDataReader ( string sp ) : System.Data.Common.DbDataReader
sp string
return System.Data.Common.DbDataReader

SPToScalar() public method

public SPToScalar ( string sp ) : object
sp string
return object

SetInstancia() public static method

public static SetInstancia ( DB db ) : void
db DB
return void

Sql() public method

public Sql ( string sql ) : int
sql string
return int

SqlToDataSet() public method

public SqlToDataSet ( DataSet dataset, string sql ) : DataSet
dataset System.Data.DataSet
sql string
return System.Data.DataSet

SqlToDataSet() public method

public SqlToDataSet ( string sql ) : DataSet
sql string
return System.Data.DataSet

SqlToDbDataReader() public method

Qwery database with sql string and return a DbDataReader
Must wrap this method with using sentence
public SqlToDbDataReader ( string sql ) : System.Data.Common.DbDataReader
sql string Sql qwery
return System.Data.Common.DbDataReader

SqlToScalar() public method

public SqlToScalar ( string sql ) : object
sql string
return object