ADOCONNECTION1.ConnectionString:=SQLSTRING+edit1.Text;
ADOCONNECTION1.Connected:=true;
if ADOCONNECTION1.Connected then
SHOWMESSAGE('ok');
else
SHOWMESSAGE('worng');
ADOCONNECTION1.Connected:=true;
if ADOCONNECTION1.Connected then
SHOWMESSAGE('ok');
else
SHOWMESSAGE('worng');
ADOCONNECTION1.Connected:=true;
EXCEPT
on EOleSysErr do
SHOWMESSAGE('worng');
end;
而everydayniceday(大卫) 提供的方法中,错误码EOleSysErr好像不存在,我用的也是d6