代码:
for (int i = 1; i <10; i++)
{
var UpdateSN = new WF_UNITINFO();
{
UpdateSN.ID = "202207200000" + i;
UpdateSN.UNITID = "DEV202207200000" + i;
UpdateSN.UNITID56 = "DEV202207200000" + i + "202000000001TEST0" + i;
}
db.Updateable<WF_UNITINFO>(UpdateSN).UpdateColumns(it => new { it.ID, it.UNITID, it.UNITID56})
.Where(it=>it.UNITID == "DEV202207200000" + i).ExecuteCommand();
}
(it=>it.UNITID == "DEV202207200000" + i)
使用Convert强制转换也一样报错
系统报错:
Oracle.ManagedDataAccess.Client.OracleException
HResult=0x80004005
Message=ORA-01722: 无效数字
Source=Oracle Data Provider for .NET, Managed Driver
StackTrace:
at SqlSugar.AdoProvider.ExecuteCommand(String sql, SugarParameter[] parameters)
at SqlSugar.UpdateableProvider`1.ExecuteCommand()
at SqlSugar.OracleUpdateable`1.ExecuteCommand()
at Queryable.Program.Main(String[] args) in D:\C#\Practice02\Queryable\Program.cs:line 114