Board index » delphi » "Leaking Paradox Database"

"Leaking Paradox Database"

Dear All,

I am having a problem inserting a record into a Paradox 7.0 database, using a
programme written in Delphi 3. It used to work fine, until I observed that
the database is "leaking" a few days ago. I am using the Prepare method and
then ExecSQL methods of the TQuery object. When I run the programme with the
table in Paradox open, I see the record appearing. When I exit from Paradox
and open the table again, the record is gone... A query carried out in the
Database Explorer does give a permanent record in the database. Has anybody
experienced the same problem? Please help.

Thanks in advance,
Steven Hoek

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    

 

Re:"Leaking Paradox Database"


For some reason I am facing the same problem and have not been able to find
out the reaon, yet.  When adding records onto the multi-table database
everything seems to work fine: I can review the data, add new records etc.
However, sometimes - but not always - when I restart the program the
recently added record have disappeared.

I could understand if they'd disappear at every restart (e.g. due to
unclosed tables) but   it happens maybe every third-fourth time only (hard
to say how regularly).

Any hints how to cure the problem would be welcome!

Andy

Re:"Leaking Paradox Database"


Quote
Antero Komppa wrote:

> For some reason I am facing the same problem and have not been able to find
> out the reaon, yet.  When adding records onto the multi-table database
> everything seems to work fine: I can review the data, add new records etc.
> However, sometimes - but not always - when I restart the program the
> recently added record have disappeared.

> I could understand if they'd disappear at every restart (e.g. due to
> unclosed tables) but   it happens maybe every third-fourth time only (hard
> to say how regularly).

BDE uses a technique called "lazy writing," where information is updated
in on-disk buffers while the writing of those buffers to disk is
delayed.  The idea is that there are often many updates being made to
the same data page in very quick succession.

Buffers will be flushed to disk in certain situations, like file-close,
end of query, and when nearly all available buffers are dirty.

The primitive "DbiUseIdleTime" is designed to flush the "dirty" on-disk
buffers to disk.  It flushes one page per call.  It should be called by
an Application.OnIdle routine, and also periodically (say, once a
second) by a timer.  This implements the background behavior.

Re:"Leaking Paradox Database"


Quote
h...@virtual-affairs.nl wrote:

> Dear All,

> I am having a problem inserting a record into a Paradox 7.0 database, using a
> programme written in Delphi 3.

Hmm, some essential info missing: Single user or multi user? What operating
system? BDE version? Do you know how the multi user BDE must be configured, and
have you double checked it? etc.

Markku Nevalainen

Re:"Leaking Paradox Database"


Dear Andy,

The posting by Sundial Services dated 12/09/1998 is helpful. I would like to
add something to that posting: In the mean time I have tried a number of
things and in my case, calling the TQuery.Close method almost immediately
after calling the ExecSQL method seems to do the job. However, I can't say I
have tested this solution thoroughly already. Would be interested to hear
what are your experiences.

By the way, some other readers asked what OS etc. I use. I am writing a CGI
programme. The database is a Paradox database, which is located on the same
machine as the webserver (IIS 4 running on top of Windows NT4 sp3). I
approach the database directly as a directory, meaning that I do not use
ODBC. I am using the BDE version supplied with Delphi 4 Client/Server. Anyway
the problems were the same before, when I was still working with the one
supplied with Delphi 3 Professional. There is only one user of the database,
i.e. the one with username IUSR_machinename. I think the configuration is all
right.

Kind regards,
Steven

In article <01be23aa$31e423c0$0364fbc4@HuuHaa>,
  "Antero Komppa" <Antero.Kom...@ambertec.fi> wrote:

Quote

> For some reason I am facing the same problem and have not been able to find
> out the reaon, yet.  When adding records onto the multi-table database
> everything seems to work fine: I can review the data, add new records etc.
> However, sometimes - but not always - when I restart the program the
> recently added record have disappeared.

> I could understand if they'd disappear at every restart (e.g. due to
> unclosed tables) but   it happens maybe every third-fourth time only (hard
> to say how regularly).

> Any hints how to cure the problem would be welcome!

> Andy

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    

Other Threads