以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  CurrentTable.Name 应用报错  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=176514)

--  作者:yifan3429
--  发布时间:2022/4/15 20:39:00
--  CurrentTable.Name 应用报错
 If e.Col.Name.Contains("计价单位" ) Then   
    Dim cmd As New SQLC ommand
    cmd.Conne cti
cmd.Comm andText = "Se lect * Fro m {CurrentTable.Name}"   
    wdt = cmd.ExecuteReader()    
    Dim s1 As String = wdt.GetCo mboListString("计价单位")
    e.Table.Cols("计价单位").Co mbolist = s1
End If

会报错

--  作者:有点蓝
--  发布时间:2022/4/16 8:51:00
--  
先看5遍:http://www.foxtable.com/webhelp/topics/1284.htm

cmd.Comm andText = "Se lect * Fro m "   & CurrentTable.Name