public IDbDataParameter GetDbParameter(NOAPDBType dbtype) { if (dbtype <= 0) { return(null); } switch (dbtype) { case NOAPDBType.Oracle: { return(new OracleParameter()); } case NOAPDBType.Sybase: { return(new AseParameter()); } case NOAPDBType.MySQL: { return(new MySqlParameter()); } } return(null); }
public IDbTransaction BeginDBTrans(IDbConnection con, NOAPDBType dbtype, IsolationLevel nLevel) { if (dbtype <= 0) { return(null); } switch (dbtype) { case NOAPDBType.Oracle: { return(((OracleConnection)con).BeginTransaction(nLevel)); } case NOAPDBType.Sybase: { return(((AseConnection)con).BeginTransaction(nLevel)); } case NOAPDBType.MySQL: { return(((MySqlConnection)con).BeginTransaction(nLevel)); } } return(null); }
public IDbConnection GetConnection(string sConStr, NOAPDBType dbtype) { if (dbtype <= 0 || string.IsNullOrEmpty(sConStr)) { return(null); } switch (dbtype) { case NOAPDBType.Oracle: { return(new OracleConnection(sConStr)); } case NOAPDBType.Sybase: { return(new AseConnection(sConStr)); } case NOAPDBType.MySQL: { return(new MySqlConnection(sConStr)); } } return(null); }
public DbDataAdapter GetDBAdapter(IDbConnection con, string sSQL, NOAPDBType dbtype) { if (dbtype <= 0) { return(null); } switch (dbtype) { case NOAPDBType.Oracle: { return(new OracleDataAdapter(sSQL, (OracleConnection)con)); } case NOAPDBType.Sybase: { return(new AseDataAdapter(sSQL, (AseConnection)con)); } case NOAPDBType.MySQL: { return(new MySqlDataAdapter(sSQL, (MySqlConnection)con)); } } return(null); }
public DbDataAdapter GetDBAdapter(IDbCommand Command, NOAPDBType dbtype) { if (dbtype <= 0) { return(null); } switch (dbtype) { case NOAPDBType.Oracle: { return(new OracleDataAdapter((OracleCommand)Command)); } case NOAPDBType.Sybase: { return(new AseDataAdapter((AseCommand)Command)); } case NOAPDBType.MySQL: { return(new MySqlDataAdapter((MySqlCommand)Command)); } } return(null); }
public DbDataAdapter GetDBAdapter() { NOAPDBType dbtype = DabaseType; if (dbtype <= 0) { return(null); } switch (dbtype) { case NOAPDBType.Oracle: { return(new OracleDataAdapter()); } case NOAPDBType.Sybase: { return(new AseDataAdapter()); } case NOAPDBType.MySQL: { return(new MySqlDataAdapter()); } } return(null); }
public IDbCommand GetDBCommond(IDbConnection con, string sSQL, NOAPDBType dbtype) { if (dbtype <= 0) { return(null); } switch (dbtype) { case NOAPDBType.Oracle: { return(new OracleCommand(sSQL, (OracleConnection)con)); } case NOAPDBType.Sybase: { return(new AseCommand(sSQL, (AseConnection)con)); } case NOAPDBType.MySQL: { return(new MySqlCommand(sSQL, (MySqlConnection)con)); } } return(null); }
public IDbCommand GetDBCommond(NOAPDBType dbtype) { if (dbtype <= 0) { return(null); } switch (dbtype) { case NOAPDBType.Oracle: { return(new OracleCommand()); } case NOAPDBType.Sybase: { return(new AseCommand()); } case NOAPDBType.MySQL: { return(new MySqlCommand()); } } return(null); }