internal IDataAdapter GetDataAdapter(string sqlCommand, IDbConnection connection, DBParameter param, CommandType commandType) { IDataAdapter adapter = null; IDbCommand command = (new CommandBuilder()).GetCommand(sqlCommand, connection, param, commandType); switch (Configuration.DBProvider.Trim().ToUpper()) { case Common.SQL_SERVER_DB_PROVIDER: adapter = new SqlDataAdapter((SqlCommand)command); break; case Common.MY_SQL_DB_PROVIDER: adapter = new MySqlDataAdapter((MySqlCommand)command); break; case Common.ORACLE_DB_PROVIDER: adapter = new OracleDataAdapter((OracleCommand)command); break; case Common.EXCESS_DB_PROVIDER: adapter = new OleDbDataAdapter((OleDbCommand)command); break; case Common.OLE_DB_PROVIDER: adapter = new OleDbDataAdapter((OleDbCommand)command); break; case Common.ODBC_DB_PROVIDER: adapter = new OdbcDataAdapter((OdbcCommand)command); break; } return(adapter); }
internal IDbCommand GetCommand(string commandText, IDbConnection connection, DBParameter parameter) { return(GetCommand(commandText, connection, parameter, CommandType.Text)); }