用DELPHI4建立与SQL数据库相关的OCX空件,引起系统异常.求救!(100分)

W

wgr

Unregistered / Unconfirmed
GUEST, unregistred user!

用Delphi4开发了一个关于打印的小模块,连接SQL SERVER数据库,调试
一切通过.现将其中所有控件转移到一个ActiveXForm上,编译成ocx控件,
注册一切正常.使用该控件时,预览打印一切正常.可是,当应用程序关闭时
出现有"SQL"标志的小沙漏光标,长时间没有反应.按ctrl+alt+del察看,曰:
"没有相应".(在Delphi集成环境下调试)

报告斑竹,刚才点完"提出问题"后,漫长的等待,代理服务器报告超时操作,
就发出了一个字,100分就没了! 请为小弟做主啊!!!!
 
试试先将在执行完操作后,先关闭数据库连接。
 
ningliu:
不行啊!我用完后又加上了:Table1.close;Table2.close
之类的话,可是故障依然.
 
会不会是您的程序有问题?
 
理论上不应该是如此,具体是做什么的?
TABLE.CLOSE未必把真正断开所有连接?
未必吧
 
to cj:
let me say,there's already a large system for MIS &amp
OA by VB6.
but VB is so poor at report, I want use Delphi 4 make some
activeXForm for each report print,and compiled to *.OCX . In VB's
programs, these ocx are work well. by now , it's all right . the
****ing things happen when I closed the main window to finish the
program runing.
my Engilish is no good,but no choice for me in a NT SERVER(English)
thanks again!
 
使用一个database控件,connect=false;keepconnect=false
table或query 通过database连接SQL数据库。
程序运行结束后,断开连接:database.connect:=false.
that's ok ,Luck for you!
 
接受答案了.
 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
D
回复
0
查看
1K
DelphiTeacher的专栏
D
顶部