BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

dataset not in edit mode -predictable?

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (Desktop)
View previous topic :: View next topic  
Author Message
HanslH
Guest





PostPosted: Sun Jan 04, 2004 2:42 pm    Post subject: dataset not in edit mode -predictable? Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (Desktop) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.