怎样判断ado连接已经失效
怎么进行重新连接.
怎么进行重新连接.
解决方案 »
- .pas是什么文件?
- 请问在SQL语句中怎样用DELPHY的变量?
- 急救……我的QuickRep为什么显示不出来,我出50分
- 在SQLServer中decimal可以定义最大的精度38位, Delphi有没有与之对应的数据类型(float最大的小数位数为15, 不够啊) ?
- delphi中如何实现c中的'<<'和'>>'移位操作符?急..急..急..急..急..
- 如何在DELPHI中实现循环操作控件呢?? (100分)
- 气死我啦!如何把网络实名干掉!!!!!
- delphi程序员能那多少?
- 帮帮小鸟飞吧!!
- 急,关于dbedit的问题,难道delphi就这样!!!!!!
- fastreport 数值比较的问题
- 一个类当中有TTimer控件,而我想在另外一个类当中调用,请问如何使用?
var
s:string;
begin
Timer.Enabled:=false;
s:='Provider=SQLOLEDB.1;Password=LEDUser;Persist Security Info=True;User ID=LEDUser;Initial Catalog=cpinfo;';
try
ADOConnection1.Close;
ADOConnection1.ConnectionString:=s;
ADOConnection1.Open;
except
Label1.Caption:='连接数据库失败!30秒后重试。(请检查网络是否连接好)';
Timer.Interval:=30000;
Timer.Enabled:=true;
end;
end;
s:='Provider=SQLOLEDB.1;Password=LEDUser;Persist Security Info=True;User ID=LEDUser;Initial Catalog=cpinfo;';
ADOConnection1.Close;
ADOConnection1.ConnectionString:=s;
ADOConnection1.Open;
ado本身为什么没有处理断开连接呢?