This commit is contained in:
grzegorz.russek
2022-09-02 07:53:41 +00:00
parent f5a1e14934
commit e8c0224a03
4 changed files with 42 additions and 41 deletions

View File

@@ -2916,7 +2916,7 @@ namespace DynamORM
/// <param name="cmd">Command containing query to execute.</param> /// <param name="cmd">Command containing query to execute.</param>
/// <returns>List of <see cref="DynamicSchemaColumn"/> objects . /// <returns>List of <see cref="DynamicSchemaColumn"/> objects .
/// If your database doesn't get those values in upper case (like most of the databases) you should override this method.</returns> /// If your database doesn't get those values in upper case (like most of the databases) you should override this method.</returns>
protected virtual IEnumerable<DynamicSchemaColumn> ReadSchema(IDbCommand cmd) public virtual IEnumerable<DynamicSchemaColumn> ReadSchema(IDbCommand cmd)
{ {
DataTable st = null; DataTable st = null;
@@ -5399,12 +5399,12 @@ namespace DynamORM
cmd.AddParameter( cmd.AddParameter(
_db.GetParameterName(paramName), dcv.ParameterDirection, _db.GetParameterName(paramName), dcv.ParameterDirection,
ds.Type, ds.Size, ds.Precision, ds.Scale, ds.Type, ds.Size, ds.Precision, ds.Scale,
isOut ? DBNull.Value : arg); isOut ? DBNull.Value : dcv.Value);
} }
else else
cmd.AddParameter( cmd.AddParameter(
_db.GetParameterName(paramName), dcv.ParameterDirection, _db.GetParameterName(paramName), dcv.ParameterDirection,
arg == null ? DbType.String : arg.GetType().ToDbType(), 0, isOut ? DBNull.Value : arg); arg == null ? DbType.String : arg.GetType().ToDbType(), 0, isOut ? DBNull.Value : dcv.Value);
} }
else else
{ {

View File

@@ -1453,7 +1453,7 @@ namespace DynamORM
/// <param name="cmd">Command containing query to execute.</param> /// <param name="cmd">Command containing query to execute.</param>
/// <returns>List of <see cref="DynamicSchemaColumn"/> objects . /// <returns>List of <see cref="DynamicSchemaColumn"/> objects .
/// If your database doesn't get those values in upper case (like most of the databases) you should override this method.</returns> /// If your database doesn't get those values in upper case (like most of the databases) you should override this method.</returns>
protected virtual IEnumerable<DynamicSchemaColumn> ReadSchema(IDbCommand cmd) public virtual IEnumerable<DynamicSchemaColumn> ReadSchema(IDbCommand cmd)
{ {
DataTable st = null; DataTable st = null;

View File

@@ -138,11 +138,11 @@ namespace DynamORM
cmd.AddParameter( cmd.AddParameter(
_db.GetParameterName(paramName), dcv.ParameterDirection, _db.GetParameterName(paramName), dcv.ParameterDirection,
ds.Type, ds.Size, ds.Precision, ds.Scale, ds.Type, ds.Size, ds.Precision, ds.Scale,
isOut ? DBNull.Value : arg); isOut ? DBNull.Value : dcv.Value);
} else } else
cmd.AddParameter( cmd.AddParameter(
_db.GetParameterName(paramName), dcv.ParameterDirection, _db.GetParameterName(paramName), dcv.ParameterDirection,
arg == null ? DbType.String : arg.GetType().ToDbType(), 0, isOut ? DBNull.Value : arg); arg == null ? DbType.String : arg.GetType().ToDbType(), 0, isOut ? DBNull.Value : dcv.Value);
} }
else else
{ {

View File

@@ -20,6 +20,7 @@ namespace Tester
//// "Data Source=test.db3;", //// "Data Source=test.db3;",
//// DynamORM.DynamicDatabaseOptions.SingleConnection | DynamORM.DynamicDatabaseOptions.SingleTransaction | //// DynamORM.DynamicDatabaseOptions.SingleConnection | DynamORM.DynamicDatabaseOptions.SingleTransaction |
//// DynamORM.DynamicDatabaseOptions.SupportSchema | DynamORM.DynamicDatabaseOptions.SupportLimitOffset); //// DynamORM.DynamicDatabaseOptions.SupportSchema | DynamORM.DynamicDatabaseOptions.SupportLimitOffset);
///
} }
private static void Main(string[] args) private static void Main(string[] args)