Subject RE: [firebird-support] Can you get firebird to check a database existence ?
Author Craig Stevens
Hi

Yes, connected to the alias DB, this does check its existence which is fine, so i moved to the next part of my problem, which is to discover whether the alias db is the newer RESTORED version, i can test its existence by connection, however now i need to know that it was restored correctly, i guess i need its file info such as the datetime stamp of the file ??? otherwise testing existence means i could get a positive result for restoration even though my restore routine did not actually work..thanks for your help

CS

-----Original Message-----
From: Daniel Rail [mailto:daniel@...]
Sent: Tuesday, 28 September 2004 8:06 PM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Can you get firebird to check a database existence ?


Hi,

At September 27, 2004, 23:26, Craig Stevens wrote:

> Can firebird do something similar to delphi's FileExist function
> given only the database Alias name ???

> I have a need to confirm a restored database works by testing to
> see if the restore db exists, but given only an aliasname it seems
> not possible, but im sure it is..if Firebird restores the db to the
> path as per the aliases.conf file, how can i obtain t
> his path from the alias ?? is there a function i am not aware of ???

The simplest way I can think of would be to try to connect to the
database. And, if the connection fails, look at the error message and
error number. If the database file can't be found, usually the error
message will indicate that. Have you already tried to connect to a DB
via an alias where the corresponding db file doesn't exists?

--
Best regards,
Daniel Rail
Senior System Engineer
ACCRA Group Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.filopto.com)



Yahoo! Groups Sponsor

ADVERTISEMENT
<http://us.ard.yahoo.com/SIG=129r3qbjv/M=295196.4901138.6071305.3001176/D=groups/S=1705115386:HM/EXP=1096452432/A=2128215/R=0/SIG=10se96mf6/*http://companion.yahoo.com> click here
<http://us.adserver.yahoo.com/l?M=295196.4901138.6071305.3001176/D=groups/S=:HM/A=2128215/rand=805258988>


_____

Yahoo! Groups Links


* To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/


* To unsubscribe from this group, send an email to:
firebird-support-unsubscribe@yahoogroups.com <mailto:firebird-support-unsubscribe@yahoogroups.com?subject=Unsubscribe>


* Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service <http://docs.yahoo.com/info/terms/> .



_____

Message protected by MailGuard: e-mail anti-virus, anti-spam and content filtering.
http://www.mailguard.com.au






[Non-text portions of this message have been removed]