以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  求解NumericComboBox 一个问题  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=27698)

--  作者:chsh2004
--  发布时间:2013/1/8 9:06:00
--  求解NumericComboBox 一个问题

Dim nn As Integer = e.Form.Controls("NumericComboBox1").Value
Dim tbl As Table = Tables("社员基本信息")
If nn = 0 Then
    tbl.Filter = ""
Else
tbl.Filter = "社员信息_社员ID = nn"
End If

 

 

错误所在事件:
详细错误信息:
System.Data.EvaluateException: Cannot find column [nn].
   at System.Data.NameNode.Bind(DataTable table, List`1 list)
   at System.Data.BinaryNode.Bind(DataTable table, List`1 list)
   at System.Data.DataExpression.Bind(DataTable table)
   at System.Data.DataExpression..ctor(DataTable table, String expression, Type type)
   at System.Data.Select..ctor(DataTable table, String filterExpression, String sort, DataViewRowState recordStates)
   at System.Data.DataTable.Select(String filterExpression)
   at Foxtable.O110ll0O0l.set_Filter(String OO010)

 

 

 

为何?哪儿错了?求告知!谢谢


--  作者:lin_hailun
--  发布时间:2013/1/8 10:00:00
--  
 表达式合成问题

Dim nn As Integer = e.Form.Controls("NumericComboBox1").Value
Dim tbl As Table = Tables("社员基本信息")
If nn = 0 Then
    tbl.Filter = ""
Else
tbl.Filter = "社员信息_社员ID = " & nn
End If