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 

edit field in TClientDataSet

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





PostPosted: Thu Dec 28, 2006 9:11 am    Post subject: edit field in TClientDataSet Reply with quote



Hello everyone,

i want to edit one field in a record held by a TClientDataSet. the
TClientDataSet should only hold one field, that i select by passing a
paramater.

this is my code, and the problem is that i can not update the database
at all. Code runs fine, with no errors, but no update. PLease help

procedure TfConfirmationofLink.btnLinkClick(Sender: TObject);
begin

fDM.cdUser_TableOneParam.Close;
fDm.cdUser_TableOneParam.Params.ParamByName('Name').AsString :=
fOperatorsandUsers.pv_sUserName;
fDM.cdUser_TableOneParam.Open;

if fDM.cdUser_TableOneParam.IsEmpty then
begin
showmessage('There was an error with your selection, close and
try again.');
Close;
end;

fDm.cdUser_TableOneParam.Edit;
fDM.cdUser_TableOneParam.FieldByName('Operator_Code').AsString :=
pv_OpeCode;
fDM.cdUser_TableOneParam.Post;

fDM.cdUser_TableOneParam.ApplyUpdates(0);

fDM.cdUser_TableOneParam.Close;
fDm.cdUser_TableOneParam.Params.ParamByName('Name').AsString :=
fOperatorsandUsers.pv_sUserName;
FDM.cdUser_TableOneParam.Open;
ModalResult := mrOk;
end;
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (Multi-Tier) 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.