代码如下:
cmd.CommandText = "sele ct 文书编号,文书单位 from {通知书} where guid='" & e.Values("主表guid") & "'"
msg(cmd.CommandText)
Dim dw1 As String
Dim bm1 As String
Dim Values = cmd.ExecuteValues
msg(Values("文书单位"))
If Values.Count > 0 Then
dw1 =Values("文书单位")
msg(dw1)
bm1=Values("文书编号")
cmd.CommandText ="upda te 文件登记表 set 文书编号='" & Values("文书编号") & "' where 主表guid='" & e.Values("主表guid") & "'"
msg(cmd.CommandText)
cmd.ExecuteNonQuery
End If
错误的事件名称项目,HttpRequest
System.Reflection.TargetInvocationException: 调用的目标发生了异常。 ---> System.InvalidCastException: 从类型“DBNull”到类型“String”的转换无效。
在 Microsoft.VisualBasic.CompilerServices.Conversions.ToString(Object Value)
在 eWebSer.form323_excel2_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)
2022-10-27 16:46:02
se lect 文书编号,文书单位 from {通知书} where guid='8a73a810-9598-4fa8-aa7a-1490ed8c4b22'
2022-10-27 16:46:02