以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  狐表经常响应慢,卡死  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=121219)

--  作者:刘洋
--  发布时间:2018/7/2 8:50:00
--  狐表经常响应慢,卡死
老师:
     你好!我在用狐表学习过程经常遇到狐表响应很慢,甚至卡死,要强行终止程序才行。请问种情况该如何处理,恳请老师指导。

--  作者:有点甜
--  发布时间:2018/7/2 8:59:00
--  

你是不是写了什么耗时的代码?比如 prepareEdit、drawcell 等事件?

 

新建一个项目也是如此?


--  作者:刘洋
--  发布时间:2018/7/2 9:52:00
--  
老师: 你好! 我是有写drawcell 事件,麻烦老师看下是不是代码有问题: If e.Col.Name = "车头行驶证_年审有效期" Then If e.Row.IsNull("车头行驶证_年审有效期") = False Then If e.Row("车头行驶证_年审有效期") < = Date.Today Then e.style = "逾期" Else If e.Row("车头行驶证_年审有效期") < = Date.Today.AddDays(30) Then e.style = "即将到期" End If End If End If End If If e.Col.Name = "车头道路运输证_年审有效期" Then If e.Row.IsNull("车头道路运输证_年审有效期") = False Then If e.Row("车头道路运输证_年审有效期") < = Date.Today Then e.style = "逾期" Else If e.Row("车头道路运输证_年审有效期") < = Date.Today.AddDays(30) Then e.style = "即将到期" End If End If End If End If If e.Col.Name = "挂车行驶证_年审有效期" Then If e.Row.IsNull("挂车行驶证_年审有效期") = False Then If e.Row("挂车行驶证_年审有效期") < = Date.Today Then e.style = "逾期" Else If e.Row("挂车行驶证_年审有效期") < = Date.Today.AddDays(30) Then e.style = "即将到期" End If End If End If End If If e.Col.Name = "挂车道路运输证_年审有效期" Then If e.Row.IsNull("挂车道路运输证_年审有效期") = False Then If e.Row("挂车道路运输证_年审有效期") < = Date.Today Then e.style = "逾期" Else If e.Row("挂车道路运输证_年审有效期") < = Date.Today.AddDays(30) Then e.style = "即将到期" End If End If End If End If If e.Col.Name = "保险_保险有效期止" Then If e.Row.IsNull("保险_保险有效期止") = False Then If e.Row("保险_保险有效期止") < = Date.Today Then e.style = "逾期" Else If e.Row("保险_保险有效期止") < = Date.Today.AddDays(30) Then e.style = "即将到期" End If End If End If End If
--  作者:刘洋
--  发布时间:2018/7/2 10:10:00
--  
老师: 你好! 我是有写drawcell 事件,麻烦老师看下是不是代码有问题: If e.Col.Name = "车头行驶证_年审有效期" Then If e.Row.IsNull("车头行驶证_年审有效期") = False Then If e.Row("车头行驶证_年审有效期") < = Date.Today Then e.style = "逾期" Else If e.Row("车头行驶证_年审有效期") < = Date.Today.AddDays(30) Then e.style = "即将到期" End If End If End If End If If e.Col.Name = "车头道路运输证_年审有效期" Then If e.Row.IsNull("车头道路运输证_年审有效期") = False Then If e.Row("车头道路运输证_年审有效期") < = Date.Today Then e.style = "逾期" Else If e.Row("车头道路运输证_年审有效期") < = Date.Today.AddDays(30) Then e.style = "即将到期" End If End If End If End If If e.Col.Name = "挂车行驶证_年审有效期" Then If e.Row.IsNull("挂车行驶证_年审有效期") = False Then If e.Row("挂车行驶证_年审有效期") < = Date.Today Then e.style = "逾期" Else If e.Row("挂车行驶证_年审有效期") < = Date.Today.AddDays(30) Then e.style = "即将到期" End If End If End If End If If e.Col.Name = "挂车道路运输证_年审有效期" Then If e.Row.IsNull("挂车道路运输证_年审有效期") = False Then If e.Row("挂车道路运输证_年审有效期") < = Date.Today Then e.style = "逾期" Else If e.Row("挂车道路运输证_年审有效期") < = Date.Today.AddDays(30) Then e.style = "即将到期" End If End If End If End If If e.Col.Name = "保险_保险有效期止" Then If e.Row.IsNull("保险_保险有效期止") = False Then If e.Row("保险_保险有效期止") < = Date.Today Then e.style = "逾期" Else If e.Row("保险_保险有效期止") < = Date.Today.AddDays(30) Then e.style = "即将到期" End If End If End If End If
--  作者:有点甜
--  发布时间:2018/7/2 10:12:00
--  

1、新项目是否会卡死,响应慢?

 

2、响应慢的项目发上来测试。说明具体如何操作后响应慢。


--  作者:刘洋
--  发布时间:2018/7/2 12:49:00
--  
老师:
    你好! 我删了几张附表,用SELECT CASE 简化了下drawcell 事件的代码现在好像可以。如果再出现我就直接发上来。

谢谢老师!