Problem terminating app - RB problem?
Hi
I have in my project source (at the top) the code:
begin
Application.CreateForm(TdmServerConnection, dmServerConnection);
try
dmServerConnection.Connect;
except
on E:Exception do
begin
ShowMessage('Error Opening Database. Please ensure server is running
and is accessible on the network. Exiting program.');
application.terminate;
exit;
end;
end;
. . .
end.
When I run it and the server can't connect, and trace through, it terminates
and then exits, going to the final 'end.'. The _next_ step in the trace
brings up a dialog asking to browse to the source file for raClass.pas, an
RB file. No forms using RB would have yet been created in the app.
Any explanations or suggestions of what I can do about it? At the moment it
leaves a messy exit from the program (with 4 or 5 error dialogs) when the
database server connection can't be made.
Thanks!
Lauchlan M
I have in my project source (at the top) the code:
begin
Application.CreateForm(TdmServerConnection, dmServerConnection);
try
dmServerConnection.Connect;
except
on E:Exception do
begin
ShowMessage('Error Opening Database. Please ensure server is running
and is accessible on the network. Exiting program.');
application.terminate;
exit;
end;
end;
. . .
end.
When I run it and the server can't connect, and trace through, it terminates
and then exits, going to the final 'end.'. The _next_ step in the trace
brings up a dialog asking to browse to the source file for raClass.pas, an
RB file. No forms using RB would have yet been created in the app.
Any explanations or suggestions of what I can do about it? At the moment it
leaves a messy exit from the program (with 4 or 5 error dialogs) when the
database server connection can't be made.
Thanks!
Lauchlan M
This discussion has been closed.
Comments
I created an example using the exact code you gave below but was unable to
recreate the AV error. Though none of the forms using RB would have been
created yet, many RB objects are created in the Application.Initialize. If
possible, please send an example demonstrating the AV to
support@digital-metaphors.com.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com