### 2022-03-11更新
------ #### MyDbV4 V3.0.2203.1101 - *.[改进]ryQuickSQL中的int和long类型直接转变为数值,而不是参数变量。 - *.[修复]ryQuickSQL中的GetUpdateSQL函数会将《计算参数》进行更新的BUG。
This commit is contained in:
parent
00c9dec061
commit
bfb3e7a2b3
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,4 +1,10 @@
|
|||
### 2022-03-01更新
|
||||
### 2022-03-11更新
|
||||
------
|
||||
#### MyDbV4 V3.0.2203.1101
|
||||
- *.[改进]ryQuickSQL中的int和long类型直接转变为数值,而不是参数变量。
|
||||
- *.[修复]ryQuickSQL中的GetUpdateSQL函数会将《计算参数》进行更新的BUG。
|
||||
|
||||
### 2022-03-01更新
|
||||
------
|
||||
#### MyDbV4 V3.0.2203.0101
|
||||
- *.[新增]新增IsInTime和IsInDay扩展函数。
|
||||
|
|
|
@ -267,10 +267,21 @@ namespace ryCommonDb
|
|||
string valueSQL = "(";
|
||||
for (int i = 0; i <List.Count; i++)
|
||||
{
|
||||
SQLIitem item = (SQLIitem)List[i];
|
||||
SQLIitem item = List[i];
|
||||
tmpFieldSQL +=item.Field + ",";
|
||||
if (item.value is long int1)
|
||||
{
|
||||
valueSQL += int1 + ",";
|
||||
}
|
||||
else if (item.value is int @int)
|
||||
{
|
||||
valueSQL += @int + ",";
|
||||
}
|
||||
else
|
||||
{
|
||||
valueSQL += "@" + item.Field.TrimStart('[').TrimEnd(']') + ",";
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < List_Nullparam.Count; i++)
|
||||
{
|
||||
tmpFieldSQL += List_Nullparam[i] + ",";
|
||||
|
@ -287,13 +298,19 @@ namespace ryCommonDb
|
|||
string tmpSQL = "update " + TableName + " set ";
|
||||
for (int i = 0; i < List.Count; i++)
|
||||
{
|
||||
SQLIitem item = (SQLIitem)List[i];
|
||||
SQLIitem item = List[i];
|
||||
if (item.value is long int1)
|
||||
{
|
||||
tmpSQL += item.Field + "=" + int1 + ",";
|
||||
}
|
||||
else if (item.value is int @int)
|
||||
{
|
||||
tmpSQL += item.Field + "=" + @int + ",";
|
||||
}
|
||||
else
|
||||
{
|
||||
tmpSQL += item.Field + "=" + "@" + item.Field.TrimStart('[').TrimEnd(']') + ",";
|
||||
}
|
||||
for (int i = 0; i < List_calcparam.Count; i++)
|
||||
{
|
||||
SQLIitem item = (SQLIitem)List_calcparam[i];
|
||||
tmpSQL += item.Field + "=" + item.value + ",";
|
||||
}
|
||||
for (int i = 0; i < List_Nullparam.Count; i++)
|
||||
{
|
||||
|
@ -319,12 +336,12 @@ namespace ryCommonDb
|
|||
System.Data.OleDb.OleDbParameter[] defPar = new System.Data.OleDb.OleDbParameter[List.Count+ List_param.Count];
|
||||
for (int i = 0; i < List.Count; i++)
|
||||
{
|
||||
SQLIitem item = (SQLIitem)List[i];
|
||||
SQLIitem item = List[i];
|
||||
defPar[i] =new System.Data.OleDb.OleDbParameter("@"+item.Field, item.value);
|
||||
}
|
||||
for (int i = List.Count; i < List.Count + List_param.Count; i++)
|
||||
{
|
||||
SQLIitem item = (SQLIitem)List_param[i- List.Count];
|
||||
SQLIitem item = List_param[i- List.Count];
|
||||
defPar[i] = new System.Data.OleDb.OleDbParameter("@" + item.Field.TrimStart('@'), item.value);
|
||||
}
|
||||
return defPar;
|
||||
|
|
|
@ -32,5 +32,5 @@ using System;
|
|||
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
|
||||
// 方法是按如下所示使用“*”: :
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("3.0.2203.0101")]
|
||||
[assembly: AssemblyFileVersion("3.0.2203.0101")]
|
||||
[assembly: AssemblyVersion("3.0.2203.1101")]
|
||||
[assembly: AssemblyFileVersion("3.0.2203.1101")]
|
|
@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
|
||||
// 方法是按如下所示使用“*”: :
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("3.0.2203.0101")]
|
||||
[assembly: AssemblyFileVersion("3.0.2203.0101")]
|
||||
[assembly: AssemblyVersion("3.0.2203.0801")]
|
||||
[assembly: AssemblyFileVersion("3.0.2203.0801")]
|
|
@ -201,6 +201,7 @@ namespace ryCommonDb
|
|||
{
|
||||
DataCommand cmd = myDb.SQL_cn.CreateCommand();
|
||||
cmd.Parameters.Clear();
|
||||
cmd.CommandTimeout = 300;
|
||||
if (Parameter != null)
|
||||
{
|
||||
for (int i = 0; i < Parameter.Length; i++)
|
||||
|
@ -259,6 +260,7 @@ namespace ryCommonDb
|
|||
{
|
||||
DataCommand cmd = myDb.SQL_cn.CreateCommand();
|
||||
cmd.Parameters.Clear();
|
||||
cmd.CommandTimeout = 300;
|
||||
if (Parameter!=null)
|
||||
cmd.Parameters.AddRange(Parameter);
|
||||
cmd.CommandText = sql;
|
||||
|
|
Loading…
Reference in New Issue
Block a user