From a9b8d20b429329bae32308f0739664ff1f8721c3 Mon Sep 17 00:00:00 2001 From: Kenton Date: Thu, 13 Mar 2025 10:47:46 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4DB2=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Src/Asp.NetCore2/DB2CoreTest/Program.cs | 2 +- .../SqlSugar.Db2Core/DB2/DB2Provider.cs | 17 ++++++++++------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/Src/Asp.NetCore2/DB2CoreTest/Program.cs b/Src/Asp.NetCore2/DB2CoreTest/Program.cs index abeca1ee8..1d87e891c 100644 --- a/Src/Asp.NetCore2/DB2CoreTest/Program.cs +++ b/Src/Asp.NetCore2/DB2CoreTest/Program.cs @@ -27,7 +27,7 @@ public class DbHelper /// Database connection string /// 数据库连接字符串 /// - public readonly static string Connection = "server=127.0.0.1:50000;database=Test;uid=db2inst1;pwd=123456;"; + public readonly static string Connection = "server=127.0.0.1:50000;database=Test;uid=db2inst1;pwd=123456;currentSchema=db2inst1;"; /// /// Get a new SqlSugarClient instance with specific configurations diff --git a/Src/Asp.NetCore2/SqlSugar.Db2Core/DB2/DB2Provider.cs b/Src/Asp.NetCore2/SqlSugar.Db2Core/DB2/DB2Provider.cs index 2fa58b05d..df0ee3397 100644 --- a/Src/Asp.NetCore2/SqlSugar.Db2Core/DB2/DB2Provider.cs +++ b/Src/Asp.NetCore2/SqlSugar.Db2Core/DB2/DB2Provider.cs @@ -215,9 +215,11 @@ namespace SqlSugar.DB2 { typeof(char[]),DB2Type.Clob}, { typeof(byte[]),DB2Type.Byte}, { typeof(bool[]),DB2Type.Boolean}, - {typeof(DateTime[]),DB2Type.Date}, - {typeof(float[]),DB2Type.Real}, - {typeof(Guid[]),DB2Type.VarChar}, + { typeof(DateTime[]),DB2Type.Timestamp}, + { typeof(DateTime[]),DB2Type.Date}, + { typeof(float[]),DB2Type.Real}, + { typeof(string[]),DB2Type.VarChar}, + { typeof(Guid[]),DB2Type.VarChar}, { typeof(int?[]),DB2Type.Integer}, @@ -227,12 +229,13 @@ namespace SqlSugar.DB2 { typeof(char?[]),DB2Type.Text}, { typeof(byte?[]),DB2Type.Byte}, { typeof(bool?[]),DB2Type.Boolean}, - {typeof(DateTime?[]),DB2Type.Date}, - {typeof(Guid?[]),DB2Type.VarChar}, + { typeof(DateTime?[]),DB2Type.Timestamp}, + { typeof(DateTime?[]),DB2Type.Date}, + { typeof(Guid?[]),DB2Type.VarChar}, - { typeof(string[]), DB2Type.Text}, - {typeof(float?[]),DB2Type.Real}, + { typeof(string[]), DB2Type.VarChar}, + { typeof(float?[]),DB2Type.Real}, }; } }