Subject | Re: [ib-support] Is Interbase Server Running? |
---|---|
Author | Woody |
Post date | 2001-10-23T19:11:20Z |
From: "M Tuttle" <miket@...>
be to put a test Open function for your main database component in the
datamodule. Something like this:
function CanConnect: boolean;
begin
try
MyDB.Open;
result := true;
except
result := false;
end;
end;
Then, you can just use this to start with. If it returns false, don't try to
do any database stuff in your app. You can show a message and exit or
whatever you want to do.
HTH
Woody
> I'm kind of new to this stuff. Can you tell me specifically what I'mNovell
> looking for or maybe a little example code?
>
> I simply want a way to determine if IBServer is running on a WinNT or
> server.access
>
> Basically when my app starts up, I receive several error messages and
> violations if the IBServer is not running and I simply want a graceful wayIt depends on what you are using but I would think the simplest method would
> to terminate my app without all these errors and AV's
>
> Any additional help welcomed.
>
be to put a test Open function for your main database component in the
datamodule. Something like this:
function CanConnect: boolean;
begin
try
MyDB.Open;
result := true;
except
result := false;
end;
end;
Then, you can just use this to start with. If it returns false, don't try to
do any database stuff in your app. You can show a message and exit or
whatever you want to do.
HTH
Woody