 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
beatrice Guest
|
Posted: Thu Dec 28, 2006 9:11 am Post subject: edit field in TClientDataSet |
|
|
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 |
|
 |
|
|
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
|
|