Beispiel #1
0
        /// <summary>
        /// 生成参数.
        /// </summary>
        /// <param name="ParamName">参数名称.</param>
        /// <param name="DbType">参数类型.</param>
        /// <param name="Size">参数大小.</param>
        /// <param name="Direction">参数方向.</param>
        /// <param name="Value">参数值.</param>
        /// <returns>生成后的参数.</returns>
        public static DbParameter MakeParam(string ParamName, DbTypeWrapper DbType, Int32 Size, ParameterDirection Direction, object Value)
        {
            DbParameter param;

            param = Provider.MakeParam(ParamName, DbType, Size);

            param.Direction = Direction;
            if (!(Direction == ParameterDirection.Output && Value == null))
            {
                param.Value = Value;
            }

            return(param);
        }
Beispiel #2
0
        public DbParameter MakeParam(string paramName, DbTypeWrapper dbType, int size)
        {
            SQLiteParameter param = null;

            if (size > 0)
            {
                param = new SQLiteParameter(paramName, dbType, size);
            }
            else
            {
                param = new SQLiteParameter(paramName, dbType);
            }

            return(param);
        }
Beispiel #3
0
 /// <summary>
 /// 生成参数.
 /// </summary>
 /// <param name="ParamName">参数名称.</param>
 /// <param name="DbType">参数类型.</param>
 /// <param name="Size">参数大小..</param>
 /// <param name="Value">参数值.</param>
 /// <returns>生成后的参数.</returns>
 public static DbParameter MakeInParam(string ParamName, DbTypeWrapper DbType, int Size, object Value)
 {
     return(MakeParam(ParamName, DbType, Size, ParameterDirection.Input, Value));
 }
Beispiel #4
0
 /// <summary>
 /// 生成参数.
 /// </summary>
 /// <param name="ParamName">参数名称.</param>
 /// <param name="DbType">参数类型.</param>
 /// <param name="Size">参数大小.</param>
 /// <returns>生成后的参数.</returns>
 public static DbParameter MakeOutParam(string ParamName, DbTypeWrapper DbType, int Size)
 {
     return(MakeParam(ParamName, DbType, Size, ParameterDirection.Output, null));
 }
Beispiel #5
0
 public System.Data.Common.DbParameter MakeParam(string paramName, DbTypeWrapper dbType, int size)
 {
     throw new NotImplementedException();
 }