Subject services api with Firebird embedded mode
Author dianedownie
Firebird 1.5 Embedded mode
Windows XP SP1

My application periodically does a backup and restore to compress the
database with the following steps:
1. backup the database
2. rename the database file to a temporary file (for failure recovery)
3. restore the database
4. cleanup the temporary file and the backup file

When I use the services api, I am unable to rename the database file
in step 2 because my process has the file open even though I detached
from the service at the end of step 1. I added a isc_service_query
call after the isc_service_start in step 1 and the file was not
locked, but this could be just timing. When I replaced the backup
and restore steps by creating a cmd line process and running gbak
(from my program directory, so presumably also running in embedded
mode), I had no locking problems.

Questions:
1) Are there known problems with the services api on Windows in
embedded mode?
2) What is the correct method to insure that the database is not open
after a services api call in embedded mode?

Thanks,
-Diane