Problem with other db app preventing me from doing SQL selects thru ODBC


I've written a program that works as a gateway between a closed database
system based upon a Microsoft Access 2.0 database, and standard NNTP
The database is constantly updated with news-articles, and what I do is
to extract these articles and post them to a local newsgroup. I do this
using ODBC.

My problem is that the application that updates the database seems to
lock the database file occationally, causing my program to either crash
or put out various ODBC, 'property could not be set in the current
connection state' or 'Access violation while blabla' errormessages.
Every time this happens, my applications doesn't free the memory it used
for the lookup, and after a weeks run it has used all the 128 MB RAM in
the computer.

I can't change anything in the database-server application that creates
the articles, so I have to find a solution that'll allow my program to
'live' with the fact that it can't access the database all the time.

I've allready set KeepConnection to FALSE and HandleShared to TRUE

I then do a couple of SELECT calls every minute.

What can I do before/after these SELECT calls to determine if it's OK to
access the database and/or what can I do to avoid alle the errormessages
and memory leaks when I do the SELECT calls at the 'wrong' time ?

 Jesper Frank Nemholt      Tel   : +45 75 82 52 56
 Pilevaenget 23 2. MF      Fax   : +45 75 82 52 69
 DK-7100 Vejle             WWW   :
 Denmark, Planet Earth...  E-Mail:

                    He who throws mud loses ground.