错误的事件名称
System.Data.OleDb.OleDbException (0x80040E21): 对于造型说明无效的字符值
在 System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method)
在 System.Data.OleDb.OleDbCommand.ExecuteNonQuery()
在 System.Data.Common.DbDataAdapter.UpdateRowExecute(RowUpdatedEventArgs rowUpdatedEvent, IDbCommand dataCommand, StatementType cmdIndex)
在 System.Data.Common.DbDataAdapter.Update(DataRow[] dataRows, DataTableMapping tableMapping)
代码如下:【运行后部分字段可以复制值 部分字段提示上述错误,目前不知晓到底是哪个字段?有没有办法进行全复制呢?】 初步排查 红色部分代码存在问题
Public Sub form304_save2_Ajax(rq as Request)
Dim e As RequestEventArgs = rq.e
Dim cmd As SQLCommand = rq.cmd
Dim str As String =e.Values("证据提供者")
msg(str)
msg(e.Values("登记编号"))
For Each s As String In str.split(",") '对传入的值进行拆分
cmd.CommandText = "sel ect * from {调取证据通知书多值} where 登记编号='" & e.Values("登记编号") & "' and 提供单位或个人='" & s & "'"
msg(cmd.CommandText)
If cmd.ExecuteScalar > 0 Then '查找到数据
msg(1)
else
msg(2)
cmd.CommandText = "sel ect * from {调取证据通知书} "
Dim dt2 As DataTable = cm d.ExecuteReader()
Dim dr1 As DataRow = dt1.AddNew
msg(3)
For Each dc As DataCol In dt1.DataCols
msg(4)
For Each dr As DataRow In dt2.SQ LSel ect("登记编号='" & e.Values("登记编号") & "' and 提供单位或个人='" & str & "'")
dr1(dc.Name) = dr(dc.Name)
dr1("提供单位或个人")=s
dr1.save
Next
Next
'Functions.Execute("多值拆分并重新生成",e.Values("证据提供者"),e.Values("登记编号"))
End if
Next
e.WriteString("")
End Sub