Dear HXTT tech support,
I posted a quick question earlier and I wasn't sure whether it went through or not. So I'm writing it again, here is a recap of our problem in more details:
We have a DBF file on our system, called show2003.dbf. This file gets overwritten by an external data driver every 5 secs. I've confirmed that the file is also updating (data content) every 5 secs. On the other hand, our in-house Java code uses the HXTT DBF driver to query out the data from this file every 5 secs. Problem is: when we startup our java app, it successfully fetchs the data from the DBF file; but 5 secs later the query still returns the same set of result as before (eventhough the DBF file has been CHANGED !). How does the HXXT DBF driver determines whether the file has been changed or not? why does it return the same query result eventhough the file content has indeed been changed? Any idea?
thx much,
Perry Lau
|
After more testing, I believe the prob is due to the "access time":
File: `/bb/data/show2003.dbf'
Size: 501579 Blocks: 1008 IO Block: 8192 regular file
Device: 1540032h/22282290d Inode: 2631 Links: 1
Access: (0666/-rw-rw-rw-) Uid: ( 2960/ op) Gid: ( 100/ general)
Access: 2009-11-27 03:05:35.562259000 -0500
Modify: 2009-11-27 02:29:53.402577000 -0500
Change: 2009-11-27 02:29:53.405769000 -0500
Looks like when the external source updates the DBF, it updates all "Last access time", "Last Modify time" and "Last Change time". The DBF driver checks the last access time and since it's up-to-late, it doesn't query from the file again. Is there a way to force the DBF driver to re-read the DBF file again regardless of what current file attributes are ?!
Thx/Perry
|
>This file gets overwritten by an external data driver every 5 secs.
>How does the HXXT DBF driver determines whether the file has been changed or not?
Don't worry. You can use lockType=VFP connetion property, if that extrernal data driver was written in VFP language. To specify a compatible lock for other applications. You can use DBASE, DBASE4BDE, DBASEIII, DBASEIV, CLIPPER, CLIPPER5.3, PowerPlus, SoftC, FOXBASE, FOXPRO, FOXPRO4UNIX, FOXPRO4BDE, and VFP.
|