Paradox DB In Use problem 
Author Message
 Paradox DB In Use problem

Hello all,

I'm writing an app that uses Paradox tables.  A couple of the tables store
data that changes frequently (every time they log into an online service).
This product is in Beta, and I have one tester that frequently terminates
the program abnormally (my programs don't "crash", they terminate
abnormally :-)).  When logging into the online service, the data in the
tables becomes obsolete.  I was using the SQL DELETE command to delete all
rows in the table.  However, this wouldn't work if they'd already crashed
the program and the files hadn't been closed properly; IDAPI thinks the
files are in use and raises an exception.

I changed my wording.  I took out the DELETE statement and iterated through
the affected files calling the Delete method.  This seemed to work, but the
same types of errors are still cropping up, though less frequently.

That brings me to my real question:  Is there a way to call IDAPI and tell
it to close all open files?  Better yet, to close specific files?  I
noticed Paradox has *.LCK files, but deleting them doesn't seem to close
the file.

Thanks to anyone who can help.

John Reynolds  



Tue, 15 Jun 1999 03:00:00 GMT  
 Paradox DB In Use problem

Quote:

>I'm writing an app that uses Paradox tables.  A couple of the tables store
>data that changes frequently (every time they log into an online service).
>This product is in Beta, and I have one tester that frequently terminates
>the program abnormally (my programs don't "crash", they terminate
>abnormally :-)).  When logging into the online service, the data in the
>tables becomes obsolete.  I was using the SQL DELETE command to delete all
>rows in the table.  However, this wouldn't work if they'd already crashed
>the program and the files hadn't been closed properly; IDAPI thinks the
>files are in use and raises an exception.

Paradox sometimes calls a table "in use" as a way of locking you out of it
when it's not sure it's safe to enter.  What you need to do is to scan for
lock files that are no longer in use and delete them.  You may also need to be
able to scan all of your databases for damage following a crash and put them
back aright automatically.

You may need to look at the url:
        http://www.azwebproducts.com/computer/sundial/sundial1.htm

... if I may be so bold.  It's just one option; also surf the search engines
for alternatives to address this and similar problems.

Quote:
>That brings me to my real question:  Is there a way to call IDAPI and tell
>it to close all open files?  Better yet, to close specific files?  I
>noticed Paradox has *.LCK files, but deleting them doesn't seem to close
>the file.

If the program is down altogether and IDAPI is still alive then you need to be
able to unload IDAPI's DLLs forcibly -- tools like the aforementioned or
SAVEPDOX.EXE do these things.  Restarting Windows will also cause the files to
be closed.

But what hasn't been established is whether damage has occurred; damage is of
course very likely, and sometimes what Paradox does is to declare the table
"in use" to keep you out of it when this happens.  Basically you need to be
able to cover all your bases -- unloading IDAPI, lock files, verify and repair
-- and do so more or less automatically.

/mr/



Tue, 15 Jun 1999 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Multiuser DB using Paradox and D3 prof

2. INDEX ERROR in NT-Networks using Paradox-DB′s

3. Using Crystal Reports (VB Edition) to read Paradox 5.0 db

4. Error in Application using WEB/Paradox DB

5. Weird problem using TTable and Access db.

6. Using LIBS and Remote InterBase DB problems

7. Problem with using MS Jet DB from Delphi

8. Help: Problem Using local Interbase with DB file on a NT Server

9. Problems with UpdateSQL and Paradox db

10. DLL accessing Paradox DB Problem

11. Problems using paradox with NT ???

12. Big problems using Paradox and Delphi

 

 
Powered by phpBB® Forum Software