Rather than count the number of connections which would be prone
to failure due to race conditions, you should do this instead:
BEGIN EXCLUSIVE;
-- run whatever SQL statements you want here,
-- or copy the database file.
COMMIT;
Just schedule this job off-hours when people are not likely using the
database.
--- Chase <[EMAIL PROTECTED]> wrote:
> is there any way (in c/c++) to find out how many current connections
> there are to a database that i am connected to?
>
> i'd like to do some housekeeping on the database every so often, but
> only if there's no one else connected to it at the time.
____________________________________________________________________________________
Building a website is a piece of cake. Yahoo! Small Business gives you all the
tools to get online.
http://smallbusiness.yahoo.com/webhosting
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------