以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  这个代码有问题么?  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=30334)

--  作者:jinzhengbe
--  发布时间:2013/3/26 10:38:00
--  这个代码有问题么?

If e.DataRow("取货人") Then
 Dim dd As DataRow
  dd= DataTables("quhuojilu").Find("取货id=" & "\'" & e.DataRow("取货id") & "\'" )
  If dd Is Nothing Then  \'如果表B中不存在相同的记录
   forms("添加档口").open \'打开"添加档口"窗口   
Else
    e.DataRow("客户名")=dd("客户名称")
    e.DataRow("取货商品名")=dd("商城代码")
End If
  End If

 

出现如下错误

.NET Framework 版本:2.0.50727.5466
Foxtable 版本:2012.11.29.1
错误所在事件:表,quhuolu,DataColChanged
详细错误信息:
System.Reflection.TargetInvocationException: ?? ??? ??? Throw????. ---> System.InvalidCastException: Conversion from string "" to type \'Boolean\' is not valid. ---> System.FormatException: ?? ???? ??? ???????.
   ??: Microsoft.VisualBasic.CompilerServices.Conversions.ParseDouble(String Value, NumberFormatInfo NumberFormat)
   ??: Microsoft.VisualBasic.CompilerServices.Conversions.ToBoolean(String Value)
   --- ?? ?? ?? ??? ? ---
   ??: Microsoft.VisualBasic.CompilerServices.Conversions.ToBoolean(String Value)
   ??: Microsoft.VisualBasic.CompilerServices.Conversions.ToBoolean(Object Value)
   ??: UserCode.DataColChanged(DataColEventArgs e)
   --- ?? ?? ?? ??? ? ---
   ??: System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
   ??: System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
   ??: System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
   ??: System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   ??: Foxtable.DataTable.O0ll10O00l0O11011l0110O0(Object O01Ol1, DataColumnChangeEventArgs O)


图片点击可在新窗口打开查看此主题相关图片如下:??.png
图片点击可在新窗口打开查看