Page 1 of 1

Application Create with Connection TimeOut = ERROR

Posted: 21.01.2009, 18:50
by Frega
Hello, im have a problem, and i don't know how to soluve it,

OnCreate of my application i have a INIFile to load the Host IP, database etc... and after the INIFile configs i have

ZConnection.Connect;

but, now the server is down, and when i try to open the application i recive this error:
Image

i want to recive this error more friendly, something like "Server is down, try again later"....
how i can do this?

thanks :D


edit

i found a fix after one hour ¬¬
just use Exception and don't use EZDataBaseError or EZSQLException

try
zconnection1.connect;
except on e:exception do begin
showmessage('server down, try again later');
application.terminate;
end;
end;

Posted: 21.01.2009, 21:16
by mdaems
except on c:EZSQLException didn't work?

Mark