Phil
Mark B.
Only one column? OK for only one table, I guess, but usually there's a
table name column and a key value column.
> Problem is the table is not always updated by the code that is supposed
> to (with disastrous results of course). It acts like the cached copy
> gets incremented, but somehow that data never gets written back to the
> server, at least not consistently.
As Mark mentioned, you need to have all write-behind caching and such
Windows phurphey turned off. I believe there's an entry in the cnews FAQ
group on this.
> Any ideas? Does it matter whether the tcursor that does the updating
> does a .postrecord or .unlockrecord after the increment step, for
> example?
Yep, unlockRecord()
--
Steve Caple
SeatTech
Besides write cache, you should disable opLocks on the computer that hosts
the auto-numbering table.
--
Tony McGuire
Tom krieg
Wouldn't the tCursor on the control table be opened and closed with each ID
generation?
--
Steve Caple
SeatTech
Tom Krieg
I haven't found that to be a significant factor; I just do what I need to
with the tCursor and close it before returning. In some cases with
multiple tCursors that requires a little extra code to close, say, the
first two when the third open fails or such, but it's no big deal.
--
Steve Caple
SeatTech
Denn Santoro
President
Resource Development Associates
http://www.RDAWorldWide.Com
Offices in the United States and Germany
Providing solutions to health care, business, governments and non-profits since
1982
I agree. But sometimes, especially when generating large numbers of
records for a process (e.g. when creating a keyed table from, say, a
transaction file) it's more efficient to leave the keys table open than
to keep opening and closing it 1000 times in sequence. But that's a
special case. I just made an observation that this is what may be
happening **if** he left the keys table open for a while.
Tom K
This method has many advantages independent of how many tables are
staying open. After about a year of use I have had no problems with
table corruption or tables remaining locked. It appears to be as stable
as having forms open.