 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
HanslH Guest
|
Posted: Sun Jan 04, 2004 2:42 pm Post subject: dataset not in edit mode -predictable? |
|
|
Newbie
Had been fooling around with database updates a few days, no problem
going about like this
DbfPAT_KAAR.FieldByName('GEBRUIKER').AsString := cArts;
Suddenly spreading like a plague came the 'dataset not in edit mode'
Now I even have to put it extra just befor a final 'post':
...
while {some conditions} do begin
if {some field value} = 'DELETED' then begin
Dbf.Edit; <-------------
Dbf.delete;
end else Dbf.next;
end;
Dbf.Edit; <------------ to prevent error on next line
Dbf.Post;
Dbf.Close;
...
Why would this last 'Edit' matter?
Why all at once? Has my beginners luck run out? Where and when should
I put Dbf.Edit commands? Every other codeline or something?
H
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|