以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 查询表加载条件放在beforeloadoutertable中错误 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=64117) |
-- 作者:kao_go -- 发布时间:2015/2/5 11:52:00 -- 查询表加载条件放在beforeloadoutertable中错误 http://www.foxtable.com/help/index.html?n=2751.htm
我按照这个帮助里面,设置动态加载表的加载条件,查询表会提示错误 |
-- 作者:Bin -- 发布时间:2015/2/5 11:52:00 -- 你条件没设置对. 条件发出来我看看 |
-- 作者:kao_go -- 发布时间:2015/2/5 11:56:00 -- Select Case e.DataTableName Case "shouye","biaoti","ftp","caozuo","danju","djbh", _ "ywy","danwei", _ "yangpin","yangpinggmx", _ "shangpin","yanse","chima","spsx1","spsx2","spsx3","spsx4","spsx5","spsx6", _ "wlcf","wldalei","wlsx1","wlsx2","wlsx3","wlsx4","wlsx5","wlsx6", _ "kehu","kehulb","khsx1","khsx2","khsx3","khsx4","khsx5","khsx6", _ "ghs","ghslb","ghssx1","ghssx2","ghssx3","ghssx4","ghssx5","ghssx6", _ "gongchang","gongchanglb","gcsx1","gcsx2","gcsx3","gcsx4","gcsx5","gcsx6", _ "cangku","cangkulb","kuwei","cksx1","cksx2","cksx3","cksx4","cksx5","cksx6" \'e.Cancel = False \'初始加载表以外的表打开时都不加载数据 Case Else \'其他所有表默认打开时都不加载数据 e.SelectString="select * fr++om " & e.DataTableName & " where id is null" End Select \'设置外部表初始加载条件(不加载数据) |
-- 作者:Bin -- 发布时间:2015/2/5 11:58:00 -- 提示什么错误? e.SelectString="select * fr++om " & e.DataTableName & " where id is null" 万一你表没有 ID列就会报错了
|
-- 作者:有点甜 -- 发布时间:2015/2/5 12:07:00 -- e.SelectString="select * fr++om " & e.DataTableName & " where 1=2" |
-- 作者:kao_go -- 发布时间:2015/2/5 13:32:00 -- 按照甜版的改了,下面是错误提示
|
-- 作者:Bin -- 发布时间:2015/2/5 14:03:00 -- 表名是不允许有下划线的 |
-- 作者:kao_go -- 发布时间:2015/2/5 14:13:00 -- 回复:(Bin)表名是不允许有下划线的 帮助里说:表名不能以数字开头,更不能全是数字,也不能包括空格和各种符号(下划线(_)除外),但是表标题没有任何限制。
真的去掉下划线就可以了,可以帮助里说下划线除外啊
其他地方使用带下划线的表名都可以,目前发现就BeforeLoadOuterTable这个事件里面会提示错误,,是不是bug啊 [此贴子已经被作者于2015-2-5 14:14:19编辑过]
|
-- 作者:有点甜 -- 发布时间:2015/2/5 14:15:00 -- e.SelectString="select * fr om {" & e.DataTableName & "} where 1=2" |
-- 作者:Bin -- 发布时间:2015/2/5 14:16:00 -- 不要用任何特殊字符的为好. |