54 lines
1.5 KiB
C#
54 lines
1.5 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using System.Data;
|
|
using System.Data.OracleClient;
|
|
namespace DBFactory
|
|
{
|
|
public class OracleDBFactory:DBFactory
|
|
{
|
|
OracleConnection conn = new OracleConnection();
|
|
public override IDbConnection GetDBConnection()
|
|
{
|
|
return conn;
|
|
}
|
|
public override IDbTransaction GetDBTransaction(IsolationLevel LockAction)
|
|
{
|
|
|
|
return conn.BeginTransaction( LockAction);
|
|
{
|
|
|
|
};
|
|
}
|
|
public override IDbCommand GetDBCommand()
|
|
{
|
|
return new OracleCommand();
|
|
}
|
|
public override IDbCommand GetDBCommand(string cmdText, IDbConnection conn1)
|
|
{
|
|
return new OracleCommand(cmdText,(OracleConnection) conn1);
|
|
}
|
|
public override IDbDataAdapter GetDataAdapter(IDbCommand dbc)
|
|
{
|
|
return new OracleDataAdapter((OracleCommand)dbc);
|
|
}
|
|
public override IDbDataAdapter GetDataAdapter( )
|
|
{
|
|
return new OracleDataAdapter( );
|
|
}
|
|
public override IDbDataParameter GetParameter()
|
|
{
|
|
return new OracleParameter();
|
|
}
|
|
public override IDbDataParameter GetParameter(string ParameterName, DbType dbtype)
|
|
{
|
|
|
|
return new OracleParameter(ParameterName, (OracleType)dbtype);
|
|
}
|
|
public override IDataReader GetDataReader(IDbCommand dbc)
|
|
{
|
|
return ((OracleCommand)dbc).ExecuteReader() ;
|
|
}
|
|
}
|
|
}
|