Board index » delphi » Why my Value is not refresh inside my application

Why my Value is not refresh inside my application


2004-12-06 09:36:39 AM
delphi98
I have a checkbox when I click de Window username is put inside Procedure
OkValid
If I check aParameters.paramByNAme('@UdserName').value
the value is Ok , after i execute my procedure the value of the Username
It's supposed to appear
in my form dbtext (Field ValidBy).
If I close and re-open my application the field validBy with the Username
Value is OK.
What's wrong in my procedure If I refresh with Navigator Button Nothing but
If I close et re-open my application all is ok.
procedure TDMod.OkValid(UserName :String);
begin
Try
Screen.Cursor := crSqlWait;
begin
a.Parameters.Clear;
a.CommandText := 'UpdateOkTagoutValidation;1';
a.Parameters.Refresh;
a.Parameters.Parambyname('@Tag_Id').value:= tblTagoutTag_id.asInteger;
a.Parameters.Parambyname('@UserName').value:= UserNAme ;
// Showmessage( a.Parameters.Parambyname('@UserName').value);
a.Execute;
end;
Finally
Screen.Cursor := crDefault;
end;
end;
My SQL Procedure is
CREATE PROCEDURE UpdateOkTagoutValidation
(
@Tag_Id int ,
@UserName Varchar(50)
)
AS
UPDATE TagOut
SET
Aproved = "F",
Valid = "T",
ValidBy = @UserNAme
WHERE
Tag_ID = @Tag_id
GO
 
 

Re:Why my Value is not refresh inside my application

I have the same problem with a keyfield with random guid. The field is not
updated. Not even with a Requery. Any other idea's. I want to fill another
table inside a afterpost event.
Thanks
Henk
"Brian Bushay TeamB" <XXXX@XXXXX.COM>writes
Quote
>What's wrong in my procedure If I refresh with Navigator Button Nothing
>but
>If I close et re-open my application all is ok.

Try AdoDataset.Requery where AdoDataset it the dataset your field is
connected
to
--
Brian Bushay (TeamB)
XXXX@XXXXX.COM