SEL ECT Sum(整改问题个数) 提示给定关键字不在字典中 麻烦老师看看,谢谢!
当前代码:【红色部分不弹值】
Dim e As RequestEventArgs = rq.e
Dim cmd As SQL Co mm and = rq.cmd
cmd.C omma ndT ext = "SEL ECT Sum(整改问题个数) From 整改问题 where 主表guid='"&e.Values("主表guid")&"'"
msg(cmd.CommandText)
Dim Values = cmd.ExecuteValues
If Values.Count > 0 Then
msg(Values("整改问题个数"))
cmd.CommandText = "UPD ATE {统计表} SET 督促整改问题= " & Values("整改问题个数") & " WHERE guid='"&e.Values("主表guid")&"' "
msg(cmd.CommandText)
cmd.ExecuteNonQuery()
End if
运行提示错误:
错误的事件名称项目,HttpRequest
System.Reflection.TargetInvocationException: 调用的目标发生了异常。 ---> System.Collections.Generic.KeyNotFoundException: 给定关键字不在字典中。
在 Microsoft.VisualBasic.CompilerServices.Symbols.Container.InvokeMethod(Method TargetProcedure, Object[] Arguments, Boolean[] CopyBack, BindingFlags Flags)
在 Microsoft.VisualBasic.CompilerServices.NewLateBinding.CallMethod(Container BaseReference, String MethodName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, BindingFlags InvocationFlags, Boolean ReportErrors, ResolutionFailure& Failure)
在 Microsoft.VisualBasic.CompilerServices.NewLateBinding.InternalLateIndexGet(Object Instance, Object[] Arguments, String[] ArgumentNames, Boolean ReportErrors, ResolutionFailure& Failure, Boolean[] CopyBack)
在 Microsoft.VisualBasic.CompilerServices.NewLateBinding.ObjectLateInvokeDefault(Object Instance, Object[] Arguments, String[] ArgumentNames, Boolean ReportErrors, Boolean[] CopyBack)
在 Microsoft.VisualBasic.CompilerServices.NewLateBinding.InternalLateInvokeDefault(Object Instance, Object[] Arguments, String[] ArgumentNames, Boolean ReportErrors, Boolean[] CopyBack)
在 eWebSer.form736_updateshuju_Ajax(Request rq)
--- 内部异常堆栈跟踪的结尾 ---
在 Microsoft.VisualBasic.CompilerServices.Symbols.Container.InvokeMethod(Method TargetProcedure, Object[] Arguments, Boolean[] CopyBack, BindingFlags Flags)
在 Microsoft.VisualBasic.CompilerServices.NewLateBinding.CallMethod(Container BaseReference, String MethodName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, BindingFlags InvocationFlags, Boolean ReportErrors, ResolutionFailure& Failure)
在 Microsoft.VisualBasic.CompilerServices.NewLateBinding.ObjectLateCall(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, Boolean IgnoreReturn)
在 Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateCall(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, Boolean IgnoreReturn)
在 UserCode.HttpRequest(RequestEventArgs e)
2023-02-03 10:56:15
S ELECT Sum(整改问题个数) From 整改问题 where 主表guid='218d3b7a-e2d2-4cfd-a682-27f97eed850e'