I've done something similar, using a command like DBRecs(). Thisgives 0 if
the file is empty, but it also throws an error if there
is a problem with the file (like, definition mismatch). You can
then trap the error with an error handler.
On Wed, Jul 15, 2009 at 7:45 PM, Keith Canniff <kcanniff@...> wrote:
>
>
> Joel,
>
> You could always issue a FileExist (IOExist in v9 or prior) and give it the
> name of one of the Pervasive files. That way you can see if it's there
> before opening it as a database table.
>
> Note: this will only work if you have folder level access to the files and
> in the newer versions of Pervasive, the network admin does not need to
> issue
> this (but most still do)
>
> Keith
>
> From: magicu-l@yahoogroups.com <magicu-l%40yahoogroups.com> [mailto:
> magicu-l@yahoogroups.com <magicu-l%40yahoogroups.com>] On Behalf
> Of jccapellan
> Sent: Wednesday, July 15, 2009 11:36 PM
> To: magicu-l@yahoogroups.com <magicu-l%40yahoogroups.com>
> Subject: [magicu-l] Knowing Database/Table Availability
>
>
> Hello everyone!
>
> First of all, I want to thank everyone for making this group alive and
> helpful specially for those who have shared their experiences and knowledge
> in this group.
>
> I want to ask from the group tips or tricks where in my eDeveloper program
> can determine that the table or the Btrieve database is not accessible or
> can not be opened so than an alternative way can be chosen. I understand
> that when table can not be opened, e.g. the server is offline, the Magic
> engine issues a "Failed to open lock file, table: <table name>" message but
> I was unable to create a program to trap it.
>
> I've tried to use the eDeveloper handler using Error Event type and set
> Event to Any, Locked Row, or Unmapped errors but it seems to have no use in
> this case.
>
> Is there someone in the group who have an idea?
>
> Joel
>
> [Non-text portions of this message have been removed]
>
>
>
--
Heidi Schuppenhauer
www.Magic-IUG.com
[Non-text portions of this message have been removed]