You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
1.9 KiB
54 lines
1.9 KiB
3 months ago
|
using System;
|
||
|
using System.Collections.Generic;
|
||
|
using System.Text;
|
||
|
using System.Data;
|
||
|
using System.Data.OracleClient;
|
||
|
namespace DBFactory
|
||
|
{
|
||
|
public class OracleDBFactory:DBFactory
|
||
|
{
|
||
|
Oracle.ManagedDataAccess.Client.OracleConnection conn = new Oracle.ManagedDataAccess.Client.OracleConnection();
|
||
|
public override IDbConnection GetDBConnection()
|
||
|
{
|
||
|
return conn;
|
||
|
}
|
||
|
public override IDbTransaction GetDBTransaction(IsolationLevel LockAction)
|
||
|
{
|
||
|
|
||
|
return conn.BeginTransaction( LockAction);
|
||
|
{
|
||
|
|
||
|
};
|
||
|
}
|
||
|
public override IDbCommand GetDBCommand()
|
||
|
{
|
||
|
return new Oracle.ManagedDataAccess.Client.OracleCommand();
|
||
|
}
|
||
|
public override IDbCommand GetDBCommand(string cmdText, IDbConnection conn1)
|
||
|
{
|
||
|
return new Oracle.ManagedDataAccess.Client.OracleCommand(cmdText,(Oracle.ManagedDataAccess.Client.OracleConnection) conn1);
|
||
|
}
|
||
|
public override IDbDataAdapter GetDataAdapter(IDbCommand dbc)
|
||
|
{
|
||
|
return new Oracle.ManagedDataAccess.Client.OracleDataAdapter((Oracle.ManagedDataAccess.Client.OracleCommand)dbc);
|
||
|
}
|
||
|
public override IDbDataAdapter GetDataAdapter( )
|
||
|
{
|
||
|
return new Oracle.ManagedDataAccess.Client.OracleDataAdapter( );
|
||
|
}
|
||
|
public override IDbDataParameter GetParameter()
|
||
|
{
|
||
|
return new Oracle.ManagedDataAccess.Client.OracleParameter();
|
||
|
}
|
||
|
public override IDbDataParameter GetParameter(string ParameterName, DbType dbtype)
|
||
|
{
|
||
|
|
||
|
return new Oracle.ManagedDataAccess.Client.OracleParameter(ParameterName, (Oracle.ManagedDataAccess.Client.OracleDbType)dbtype);
|
||
|
}
|
||
|
public override IDataReader GetDataReader(IDbCommand dbc)
|
||
|
{
|
||
|
return ((Oracle.ManagedDataAccess.Client.OracleCommand)dbc).ExecuteReader() ;
|
||
|
}
|
||
|
}
|
||
|
}
|