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.
53 lines
1.5 KiB
53 lines
1.5 KiB
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() ;
|
|
}
|
|
}
|
|
}
|