以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 读取数据替换问题 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=146004) |
-- 作者:chongziwang -- 发布时间:2020/2/13 23:13:00 -- 读取数据替换问题 Select Case e.Path Case "test.htm"
页面的数据,读取数据表中数据到这里 End Select e.WriteString(wb.Build) 这样的方式可不可以实现,怎么实现? |
-- 作者:有点蓝 -- 发布时间:2020/2/14 10:09:00 -- 显示表格数据?参考: http://www.foxtable.com/mobilehelp/topics/0067.htm http://www.foxtable.com/mobilehelp/topics/0074.htm
|
-- 作者:chongziwang -- 发布时间:2020/2/14 12:37:00 -- 不是,可能我没有表述清楚,是原本写好的代码,我放到数据库里,这样修改代码的时候直接修改数据库数据就可以了 比如: With wb.AddTable("","Table1") .BooleanSymbol= "√×" .CreateFromTable(Tables("订单")) End With 这段我放到数据库中,怎么把这段显示出来
[此贴子已经被作者于2020/2/14 13:02:28编辑过]
|
-- 作者:有点蓝 -- 发布时间:2020/2/14 13:30:00 -- 使用动态函数:http://www.foxtable.com/webhelp/topics/1487.htm Dim Code As string = "某单元格保存的代码" Functions.Add("某名称",Code) Functions.Complie() 调用此函数: Functions.Execute("某名称") |
-- 作者:chongziwang -- 发布时间:2020/2/14 22:16:00 -- .NET Framework 版本:4.0.30319.42000 Foxtable 版本:2019.12.17.18 错误所在事件:自定义函数test 详细错误信息: 调用的目标发生了异常。 索引超出了数组界限。 函数代码: Dim e As RequestEventArgs = args(0) Select Case e.Path Case "test.htm" Dim r As DataRow = DataTables("设置").SQLFind("页面 = \'test\'") Dim Code As String = r("代码") Functions.remove("test") Functions.Add("test",Code) Functions.Complie() \'重新编译 Functions.Execute("test") \'调用此函数 End Select 代码只写了一句话 e.WriteString("OK") 求解? |
-- 作者:有点蓝 -- 发布时间:2020/2/14 22:18:00 -- Dim e As RequestEventArgs = args(0) Select Case e.Path Case "test.htm" Dim r As DataRow = DataTables("设置").SQLFind("页面 = \'test\'") Dim Code As String = r("代码") Functions.remove("test") Functions.Add("test",Code) Functions.Complie() \'重新编译 Functions.Execute("test",e) \'调用此函数 End Select 代码至少2句 Dim e As RequestEventArgs = args(0) e.WriteString("OK") |
-- 作者:chongziwang -- 发布时间:2020/2/14 22:48:00 -- 实现了,谢谢老师,点赞!!! |