Browse Source

Update access

pull/14/head
sunkaixuan 3 years ago
parent
commit
ac54f02455
  1. BIN
      Src/Asp.Net/AccessTest/Test.accdb
  2. 12
      Src/Asp.Net/SqlSugar.Access/Access/AccessProvider.cs

BIN
Src/Asp.Net/AccessTest/Test.accdb

Binary file not shown.

12
Src/Asp.Net/SqlSugar.Access/Access/AccessProvider.cs

@ -133,12 +133,12 @@ namespace SqlSugar.Access
sqlParameter.Size = parameter.Size; sqlParameter.Size = parameter.Size;
sqlParameter.Value = parameter.Value; sqlParameter.Value = parameter.Value;
sqlParameter.DbType = parameter.DbType; sqlParameter.DbType = parameter.DbType;
//var isTime = parameter.DbType == System.Data.DbType.Time; var isTime = parameter.DbType == System.Data.DbType.DateTime;
//if (isTime) if (isTime)
//{ {
// sqlParameter.DbType = SqlDbType.Time; sqlParameter.DbType = System.Data.DbType.String;
// sqlParameter.Value=DateTime.Parse(parameter.Value?.ToString()).TimeOfDay; sqlParameter.Value = sqlParameter.Value.ToString();
//} }
if (sqlParameter.Value!=null&& sqlParameter.Value != DBNull.Value && sqlParameter.DbType == System.Data.DbType.DateTime) if (sqlParameter.Value!=null&& sqlParameter.Value != DBNull.Value && sqlParameter.DbType == System.Data.DbType.DateTime)
{ {
var date = Convert.ToDateTime(sqlParameter.Value); var date = Convert.ToDateTime(sqlParameter.Value);

Loading…
Cancel
Save