More BDE Hate

[prev] [thread] [next] [lurker] [Date index for 2005/04/21]

From: Phil!Gregory
Subject: More BDE Hate
Date: 16:23 on 21 Apr 2005
I would love to stop using the BDE.  If only we didn't have so much legacy
code that relies on it.

The BDE sometimes needs to create temporary tables for intermediate data
(often as a result of SQL queries) it does this in what it calls a private
directory.  (You need to set the private directory because if you don't
the BDE will use the same directory that your executable is in, and that's
bad, because it makes the lock files too large.  I don't know why; it just
does.  But that's an old hate now.)

When you initialize your BDE session, the session puts an exclusive lock
on the directory.  So you can't have multiple instances of your program
using the same directory.  Fine, I can deal with that.  Oh, and if the
program exits unexpectedly and doesn't unload the BDE, that directory
stays locked.  "Okay," I think, "since I only have one instance of my
program running, I'll just have it delete any old lock files when it
starts, since they won't be valid."  What I learned is that the BDE DLL[0]
remembers the locks, so as long as any other program has the DLL loaded, I
can't just restart my program.  Needless to say, this makes developing and
debugging the program somewhat painful.  Program crashes, I have to go
exit all other BDE-using programs on my system, then restart them, because
I need to use them.  Repeat every time the program dies while I'm working
on it.  Hate, hate, hate.


[0] The BDE DLL is actually named idapi.dll.  Go figure.

-- 
...computer contrarian of the first order... / http://aperiodic.net/phil/
PGP: 026A27F2  print: D200 5BDB FC4B B24A 9248  9F7A 4322 2D22 026A 27F2
--- --
Typos in _Finnegans Wake_?  How could you tell?
                       -- Kim Stanley Robinson
---- --- --

Generated at 01:00 on 03 May 2005 by mariachi 0.52