一个“灾难性故障”的问题(100分)

U

upfeed

Unregistered / Unconfirmed
GUEST, unregistred user!
我在使用ADO访问数据库的时候,经常出现“灾难性故障”的提示。

什么原因我也不知道,甚至于如何提出这个问题我都不肯定

希望有遇到过此类问题的朋友伸出友爱之手
 
连不上就经常“灾难性故障“,也就是说用户名或者密码不对。
另外,D5用ado需要装ado补丁。
borland网站有下载。
 
我用的是D6,
这个问题是忽隐忽现的
应该不是用户名和密码的错误
 
什么意思?
 
说一下具体操作
 
with DataModule1 do
Begin
if not dm_TCPIPCon.Connected then
dm_TCPIPCon.Connected := True;
with com_cds do
Begin
if(ComboBoxAbsent_Time.Text='上午') then
TimeStr:='0'
else
TimeStr:='1';
//检查是否有重复记录
Temps:='select * from empl_present where Empl_ID='''
+EmplID+'''and Cur_Date='''
+EditCur_date.Text+''' and Absent_time='''
+TimeStr+'''';
com_cds.Close;
CommandText := temps ;
Memo1.Text:=Temps;
Open;
if RecordCount>0 then
begin
showMessage('数据库中存在相同记录。请检查字段是否正确!');
com_cds.Close;
end
else
begin
Temps:='insert into empl_present(empl_ID,cur_Date,time1,time2,absent_time,absent_info,desc1)values('''
+EmplID+''','''+EditCur_date.Text+''','''+EditTime1.Text+''','''+EditTime2.Text+''','''
+TimeStr+''','''
+ComboBoxAbsent_info.Text+''','''
+EditDesc.Text+''')';
com_cds.Close;
CommandText := temps ;
Memo1.Text:=Temps;
Execute;
end;//else 不存在记录
end;//DataSet
dm_TCPIPCon.Connected := False;
end;//dataModule
一开始用com_cds查询是否存在相同的记录,然后用com_cds插入新的记录,
就在插入新的时候,系统报错了“灾难性”的
 
我用的是DELPHI6,没有用ADO,而是BDE,运行时也是提示这个错误,请问是怎么回事?
 
顶部