Hi folks,
I have a TTable object open on a Paradox table, using a
secondary index to alter the display order in a DBGrid (optionally
not visible, hence the table may not always be open).
Occasionally, I need to post records to that table (on a button
push, not from the grid), so I do something like this -- basically
an open, post, close and optional re-open for display purposes:
indexName:='';
Filtered := false;
try
open;
append;
fields[0].asstring := cbWho.Text; // etc.
post;
finally
close;
indexName:='IND_TheDate';
Filtered := True;
if cbView.checked then
begin
open; // BUT I always get "index is out of date"
DBGrid1.refresh
end;
end;
The "BUT" above is what I'm trying to resolve. No matter what I
do, I get that message if I post records to the table with the code
above, yet if I do the same kind of thing from DBD or
Paradox/Win, there is no error.
(I did get an "index is read only" error after deleting and re-
creating the secondary index, then trying to do the post without
setting IndexName to '' first. That is different, but doesn't feel like
progress <g>).
Can't find much of a clue in the help and, since I haven't ever
encountered this particular niggle before, I thought I'd appeal to
those who are more familiar than I am with this beastie these
days.
Clues welomed.
cheers,
peter
============================================
Peter Hyde, WebCentre and SPIS, Christchurch, New Zealand
* Web automation for online periodicals: http://TurboPress.com
* TurboNote: http://TurboPress.com/tbnote.htm
-- small, FREE and very handy
---------------------------------------------------------------------------
New Zealand Delphi Users group - Database List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz