不知道你的ado什么版本,我用的是win2k的ado 2.5,没有你的感觉。
解决方案 »
- 有关<中国游戏开发>的潜力有多大,游戏开发人才需求大吗?
- ★送分帖,请 dabaicai、xianggang101、xiaokexinger三位朋友进入★
- 长春地区找陪聊(别歪想,只是想找人聊天)
- 比较的问题.为什么会显示相同.但比较就变了不同呢?
- SQL查询问题,Autoincrement,memo字段查询问题,在线等待!!!!!!!
- 哪位大虾知道是否有显示时间进度条一样的控件
- 大侠们,请教!!
- 请问怎样才能把程序中的变量(不是字段值)等输出到frReport1的报表中的适当的地方呢?
- 急! 取得一个目录的大小(包括其所有子目录和文件)?
- dll文件操作
- ?请问在delphi中怎样能以最快的速度找到所需控件?
- 如何再生成由QUERY1生成数据的第N条到第M条记录?
但是我又不知道怎么解决,在每次被TIME执行时我也有打开和关闭数
据库但效果也是一样,没有作用!
在一段时间内自动退出再进入!都有一个共同点就是用了TIMER控件它会产生
一个线程吗?
var
gzsz:array[1..60] of boolean;
jsrs,xsrs,hyrs,ykrs,txrs:integer;
i:integer;
begin
timer1.Enabled:=false;
jsrs:=0;
xsrs:=0;
hyrs:=0;
ykrs:=0;
txrs:=0;
i:=1;
with data.gzwl do
begin
close;
open;
first;
while not Eof do
begin
if fieldbyname('fs').value='apple' then
jsrs:=jsrs+1
else if fieldbyname('fs').Value='orange' then
hyrs:=hyrs+1
else if fieldbyname('fs').Value='banger' then
txrs:=txrs+1
else if fieldbyname('fs').Value='sandwich' then
xsrs:=xsrs+1
else if fieldbyname('fs').Value='egg' then
ykrs:=ykrs+1;
gzsz[i]:=fieldbyname('netopen').Value;
next;
i:=i+1;
end;
close;
end;
if gzsz[1]=true then gz1.Color:=clLime
else gz1.Color:=clred;
if gzsz[2]=true then gz2.Color:=cllime
else gz2.Color:=clred;
if gzsz[3]=true then gz3.Color:=cllime
else gz3.Color:=clred;
if gzsz[4]=true then gz4.Color:=cllime
else gz4.Color:=clred;
if gzsz[5]=true then gz5.Color:=cllime
else gz5.Color:=clred;
if gzsz[6]=true then gz6.Color:=cllime
else gz6.Color:=clred;
if gzsz[7]=true then gz7.Color:=cllime
else gz7.Color:=clred;
if gzsz[8]=true then gz8.Color:=cllime
else gz8.Color:=clred;
if gzsz[9]=true then gz9.Color:=cllime
else gz9.Color:=clred;
if gzsz[10]=true then gz10.Color:=cllime
else gz10.Color:=clred;
if gzsz[11]=true then gz11.Color:=cllime
else gz11.Color:=clred;
if gzsz[12]=true then gz12.Color:=cllime
else gz12.Color:=clred;
if gzsz[13]=true then gz13.Color:=cllime
else gz13.Color:=clred;
if gzsz[14]=true then gz14.Color:=cllime
else gz14.Color:=clred;
if gzsz[15]=true then gz15.Color:=cllime
else gz15.Color:=clred;
if gzsz[16]=true then gz16.Color:=cllime
else gz16.Color:=clred;
if gzsz[17]=true then gz17.Color:=cllime
else gz17.Color:=clred;
if gzsz[18]=true then gz18.Color:=cllime
else gz18.Color:=clred;
if gzsz[19]=true then gz19.Color:=clLime
else gz19.Color:=clred;
if gzsz[20]=true then gz20.Color:=cllime
else gz20.Color:=clred;
if gzsz[21]=true then gz21.Color:=cllime
else gz21.Color:=clred;
if gzsz[22]=true then gz22.Color:=cllime
else gz22.Color:=clred;
if gzsz[23]=true then gz23.Color:=cllime
else gz23.Color:=clred;
if gzsz[24]=true then gz24.Color:=cllime
else gz24.Color:=clred;
if gzsz[25]=true then gz25.Color:=cllime
else gz25.Color:=clred;
if gzsz[26]=true then gz26.Color:=cllime
else gz26.Color:=clred;
if gzsz[27]=true then gz27.Color:=cllime
else gz27.Color:=clred;
if gzsz[28]=true then gz28.Color:=cllime
else gz28.Color:=clred;
if gzsz[29]=true then gz29.Color:=cllime
else gz29.Color:=clred;
if gzsz[30]=true then gz30.Color:=cllime
else gz30.Color:=clred;
if gzsz[31]=true then gz31.Color:=cllime
else gz31.Color:=clred;
if gzsz[32]=true then gz32.Color:=cllime
else gz32.Color:=clred;
if gzsz[33]=true then gz33.Color:=cllime
else gz33.Color:=clred;
if gzsz[34]=true then gz34.Color:=cllime
else gz34.Color:=clred;
if gzsz[35]=true then gz35.Color:=cllime
else gz35.Color:=clred;
if gzsz[36]=true then gz36.Color:=cllime
else gz36.Color:=clred;
if gzsz[37]=true then gz37.Color:=cllime
else gz37.Color:=clred;
if gzsz[38]=true then gz38.Color:=cllime
else gz38.Color:=clred;
if gzsz[39]=true then gz39.Color:=cllime
else gz39.Color:=clred;
if gzsz[40]=true then gz40.Color:=cllime
else gz40.Color:=clred;
if gzsz[41]=true then gz41.Color:=cllime
else gz41.Color:=clred;
if gzsz[42]=true then gz42.Color:=cllime
else gz42.Color:=clred;
if gzsz[43]=true then gz43.Color:=cllime
else gz43.Color:=clred;
if gzsz[44]=true then gz44.Color:=cllime
else gz44.Color:=clred;
if gzsz[45]=true then gz45.Color:=cllime
else gz45.Color:=clred;
if gzsz[46]=true then gz46.Color:=cllime
else gz46.Color:=clred;
if gzsz[47]=true then gz47.Color:=cllime
else gz47.Color:=clred;
if gzsz[48]=true then gz48.Color:=cllime
else gz48.Color:=clred;
if gzsz[49]=true then gz49.Color:=clLime
else gz49.Color:=clred;
if gzsz[50]=true then gz50.Color:=cllime
else gz50.Color:=clred;
if gzsz[51]=true then gz51.Color:=cllime
else gz51.Color:=clred;
if gzsz[52]=true then gz52.Color:=cllime
else gz52.Color:=clred;
if gzsz[53]=true then gz53.Color:=cllime
else gz53.Color:=clred;
if gzsz[54]=true then gz54.Color:=cllime
else gz54.Color:=clred;
if gzsz[55]=true then gz55.Color:=cllime
else gz55.Color:=clred;
if gzsz[56]=true then gz56.Color:=cllime
else gz56.Color:=clred;
if gzsz[57]=true then gz57.Color:=cllime
else gz57.Color:=clred;
if gzsz[58]=true then gz58.Color:=cllime
else gz58.Color:=clred;
if gzsz[59]=true then gz59.Color:=cllime
else gz59.Color:=clred;
if gzsz[60]=true then gz60.Color:=cllime
else gz60.Color:=clred;
jslab.Caption:=inttostr(jsrs);
hylab.Caption:=inttostr(hyrs);
txlab.Caption:=inttostr(txrs);
xslab.Caption:=inttostr(xsrs);
yklab.Caption:=inttostr(ykrs);
tjlab.Caption:=inttostr(jsrs+hyrs+txrs+xsrs+ykrs);
timer1.Enabled:=true;
end;
使用它, 仍然是在主线程中执行.
Michael_Song(Michael Song) 的建议建议听一下.
access在运行过程中会变得越来越大(尽管有时你对它进行的是删除操作),因为它要保存很多信息到数据库中(日志之类),所以access体积迅速庞大,自然会影响程序速度
来自:vecm, 时间:2002-8-16 23:15:00, ID:1269999
同志,我可算找到你了!
半年前我也遇到同样的问题,但比你更新数据库的速度还频繁。速度要求:“慢速1记录/s,快速7~8记录/s”。用单独线程做记录,5分钟后速度明显放缓!单步跟踪发现Post语句变得运行极慢!最后我的解决方法是“定义结构化文件”,自己写添加、删除、查询语句。速度方面绝对没问题,记录几十个小时都不会变慢。用文件吧,除了移植性差,编程量大些,性能没的说。
来自:Block_K_E, 时间:2002-8-16 23:33:00, ID:1270023
将CLose,open取消调试试。
来自:delphiplayer, 时间:2002-8-17 0:39:00, ID:1270101 | 编辑
vecm您好非常感谢您提供的资料,但定义结构文件!天啊!我不是要累死!有没有其它办法,还有我听有人说这是因为ACCESS要记录日志文件造成的?我们是不是能找到更容易点办法,比如不要用ACCESS用ODBC的其它表可以吗请指教!
你看看下面几个参数这样设置后,是否解决问题:
CacheSize=100
CursorLocation=clUseClient
Prepared=True
还有,我看你上面的代码,不是编辑和修改啊,只是循环读取数据。
如果是这样的话,继续设置以下参数:
Cursortype=ctOpenForwardOnly
LockType=ltReadOnly
我想,这样,你解决你的问题。
to cdws222(www.teatool.com) ,已经控制了timer1.enable,应该不会重复进入