Subject Re: [IBO] Run without .gdb
Author Geoff Worboys
> My app has several forms, each with a tIBOdatabase component. I
> would like to run without database support. I guess the best way
> to do this is to set a "UseDB" property to false if (a) the .gdb
> does not exist or (b) user desires to run without DB support.

Sounds fair - presuming you have something useful to do when there
is no database connection.


> Would like to know the best way to achieve this. I suppose it
> might be to check if the .gdb exists. Where is the best place
> (hopefully only one place) to make the check?

If you are always operating locally then you can just check for
the existance of the file. If you may be running against a
remote database then I suggest simply catching the particular
exception (when you try to connect) and setting your flag.

I believe the IB_ISCError exception you are looking to catch
has ERRCODE = isc_io_error: //335544344

(isc_io_error is defined in IB_Header, or you can just use
the number).


--
Geoff Worboys
Telesis Computing