Subject | Possible problem with Master-Detail tables |
---|---|
Author | mspencewasunavailable |
Post date | 2006-12-13T20:27:05Z |
This is just a heads-up, because I have to move along and am going
to do this another way entirely, but if this is a new bug, I'll try
to isolate it a little more when I have time.
In the following code fragment, tblTrans is a detail table. I want
to collect all of the rows from tblTrans that refer to a given
invoice (by calling CopyRecord). It seems like each time I execute
this code, the records in tblTrans get returned as many times as the
code's been executed. In other words, it works the first time (I
get the list). The second time, the list is doubled. The third
time, I get three copies of everything.
I'm not using cached updates. Have there been any reports of things
like this before?
with tblTrans do
begin
DisableControls;
First;
while Not Eof do
begin
if FieldByName('Invoice #').AsString = szInvNum
then
begin
if Not CopyRecord(tblTrans) then
begin
Break
end;
end;
Next;
end;
EnableControls;
end
Michael D. Spence
Mockingbird Data Systems, Inc.
to do this another way entirely, but if this is a new bug, I'll try
to isolate it a little more when I have time.
In the following code fragment, tblTrans is a detail table. I want
to collect all of the rows from tblTrans that refer to a given
invoice (by calling CopyRecord). It seems like each time I execute
this code, the records in tblTrans get returned as many times as the
code's been executed. In other words, it works the first time (I
get the list). The second time, the list is doubled. The third
time, I get three copies of everything.
I'm not using cached updates. Have there been any reports of things
like this before?
with tblTrans do
begin
DisableControls;
First;
while Not Eof do
begin
if FieldByName('Invoice #').AsString = szInvNum
then
begin
if Not CopyRecord(tblTrans) then
begin
Break
end;
end;
Next;
end;
EnableControls;
end
Michael D. Spence
Mockingbird Data Systems, Inc.