Exemplo n.º 1
0
        public static MySqlParameter GetDataParameter(DBCommandParameter parameter)
        {
            switch (parameter.ParamType)
            {
            case DBCommandParamType.Int:
                return(new MySqlParameter(string.Format("@{0}", parameter.ParamName), MySqlDbType.Int32, parameter.ParamLength));

            case DBCommandParamType.VarChar:
                return(new MySqlParameter(string.Format("@{0}", parameter.ParamName), MySqlDbType.VarChar, parameter.ParamLength));

            default:
                return(null);
            }
        }
Exemplo n.º 2
0
        public static OracleParameter GetDataParameter(DBCommandParameter parameter)
        {
            switch (parameter.ParamType)
            {
            case DBCommandParamType.Int:
                return(new OracleParameter(string.Format("{0}", parameter.ParamName), OracleType.Int32, parameter.ParamLength));

            case DBCommandParamType.Number:
                return(new OracleParameter(string.Format("{0}", parameter.ParamName), OracleType.Number, parameter.ParamLength));

            case DBCommandParamType.VarChar:
                return(new OracleParameter(string.Format("{0}", parameter.ParamName), OracleType.VarChar, parameter.ParamLength));

            case DBCommandParamType.NVarChar:
                return(new OracleParameter(string.Format("{0}", parameter.ParamName), OracleType.NVarChar, parameter.ParamLength));

            default:
                return(null);
            }
        }