Ejemplo n.º 1
0
        DbParameter IDBBase.CreateParameter(LBDbParameter dbParm)
        {
            int iScale = LBDBType.GetSqlDbTypeScale(dbParm.LBDBType);

            if (iScale < 0)
            {
                iScale = 0;
            }

            return(new SqlParameter(
                       "@" + dbParm.ParameterName,
                       LBDBType.GetSqlDbType(dbParm.LBDBType),
                       LBDBType.GetSqlDbTypeSize(dbParm.LBDBType),
                       dbParm.Direction,
                       true,
                       LBDBType.GetSqlDbTypePrecision(dbParm.LBDBType),
                       (byte)iScale,
                       "",
                       DataRowVersion.Current,
                       dbParm.Value == null ? DBNull.Value : dbParm.Value));
        }
Ejemplo n.º 2
0
        DbParameter IDBBase.CreateParameter(LBDbParameter dbParm)
        {
            int iScale = LBDBType.GetSqlDbTypeScale(dbParm.LBDBType);

            if (iScale < 0)
            {
                iScale = 0;
            }

            SQLiteParameter parameter = new SQLiteParameter("@" + dbParm.ParameterName, LBDBType.GetSqlDbType(dbParm.LBDBType));

            parameter.Value = dbParm.Value == null ? DBNull.Value : dbParm.Value;
            return(parameter);


            //        return new SQLiteParameter(
            //"@" + dbParm.ParameterName,
            //            LBDBType.GetSqlDbType( dbParm.LBDBType ),
            //            LBDBType.GetSqlDbTypeSize( dbParm.LBDBType),
            //dbParm.Direction,
            //true,
            //            LBDBType.GetSqlDbTypePrecision( dbParm.LBDBType),
            //(byte)iScale,
            //"",
            //DataRowVersion.Current,
            //dbParm.Value == null ? DBNull.Value : dbParm.Value );
        }