X
xp166
Unregistered / Unconfirmed
GUEST, unregistred user!
在连接socket是我想判断一下,这样写为什么不行?在连接不上时,还是报错
try
SocketConnection1.Address:='xxx.xxx.xxx.xxx';
SocketConnection1.ServerName:='filename.DySQLServer';
SocketConnection1.Open ;
showmessage('连接成功');
SocketConnection1.Close;
except
showmessage('连接失败');
SocketConnection1.Close;
end
try
SocketConnection1.Address:='xxx.xxx.xxx.xxx';
SocketConnection1.ServerName:='filename.DySQLServer';
SocketConnection1.Open ;
showmessage('连接成功');
SocketConnection1.Close;
except
showmessage('连接失败');
SocketConnection1.Close;
end