Subject Re: [IBO] Application does not connect
Author paultugwell
--- In IBObjects@yahoogroups.com, Helen Borrie <helebor@...> wrote:
>
> At 11:51 PM 7/01/2008, you wrote:
> >--- In IBObjects@yahoogroups.com, Helen Borrie <helebor@> wrote:
> >>
> >> At 03:55 AM 5/01/2008, you wrote:
> >> >I am using IBODatabase to make a connection to a database over
a
> >VPN.
> >> >This has generally been sucessful although the connection takes
up
> >to
> >> >90 seconds to become established, but on one site I have
recently
> >> >encountered a problem. Sometimes, usually in the moring when
the
> >user
> >> >tries to connect for the first time, the application does not
make a
> >> >connection and hangs.
> >>
> >> What OS is the server running on? what is the name of the
database
> >file?
> >>
> >> Helen
> >>
> >
> >Windows 2003. system.gdb. The PC is XP SP2.
>
> OK...".gdb" is certainly a problem on an XP server but I don't
*think* there's the same problem on Server2003.
>
> When you say "the user", do you mean "the first user to log in for
the day", or what? When this kind of thing happens at the start of
play, it's usually that the server hasn't gotten around to starting
the Firebird service yet.
>
> A 90-second startup isn't very nice, although perhaps expected with
IBO if you have a lot of metadata and you're opening all your
datasets on Show. If you're doing that, you might like to rethink it
a bit - it's not appropriate for client/server unless the app is
local.
>
> What connection protocol are you using?
>
> Helen
>

I am using TCP/IP. The server is always on, and this particular user
is not always the first one to log on. I have had an example of him
having this problem mid or late morning when other people have
certainly logged on before him. When the uses connects to the server,
the only process that takes place is the establishment of the
connection using TIBODatabase and a TIBOQuery that returns a single
record. Data is only called from the server as and when required.
What is concerning me is why the application hangs and what I can do
to cause the applciation to terminate rather than hang if the
establishment of the connection fails. The code to establish the
connection is in a try/except/end construct, so if the connection
fails, the except routine, which displays an error message, should
operate. I know this routine works because an error message appears
if I deliberately create an error e.g. if I stop FB on the server.