Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit f451a16

Browse files
committed
Merge pull request #475 from yuinlin/FixSetParametersForOracle
fix order of setting DbType and Value when creating DbDataParameter
2 parents a67aa72 + 1184881 commit f451a16

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ServiceStack.OrmLite/OrmLiteReadCommandExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,9 +294,9 @@ internal static IDbCommand SetParameters(this IDbCommand dbCmd, IDictionary<stri
294294
p.ParameterName = kvp.Key;
295295

296296
p.Direction = ParameterDirection.Input;
297-
p.Value = value ?? DBNull.Value;
298297
if (value != null)
299298
dialectProvider.InitDbParam(p, value.GetType());
299+
p.Value = value ?? DBNull.Value;
300300

301301
dbCmd.Parameters.Add(p);
302302
}

0 commit comments

Comments
 (0)