2,497
社区成员
发帖
与我相关
我的任务
分享
Cmd := TADOCommand.Create(nil);
Cmd.Connection := dataform.conn;
if dataform.conn.InTransaction then dataform.conn.RollbackTrans;
dataform.conn.BeginTrans;
user_id := trim(edit3.Text );
user_name := trim(edit1.Text );
pass_word := trim(edit2.Text );
memo_1 := trim(Memo1.Text );
cmd.CommandText := 'update tbuse set password =:pass_word where userid =:user_id';
cmd.CommandType := cmdText;
cmd.Parameters.ParamByName('pass_word').Value := pass_word;
cmd.Parameters.ParamByName('user_id').Value := user_id;
cmd.Execute ;
Cmd := TADOCommand.Create(nil);
Cmd.Connection := dataform.conn;
if dataform.conn.InTransaction then dataform.conn.RollbackTrans;
dataform.conn.BeginTrans;
user_id := trim(edit3.Text );
user_name := trim(edit1.Text );
pass_word := trim(edit2.Text );
memo_1 := trim(Memo1.Text );
cmd.CommandText := 'update tbuse set [password] =:pass_word where [userid] =:user_id';
cmd.CommandType := cmdText;
cmd.Parameters.ParamByName('pass_word').Value := pass_word;
cmd.Parameters.ParamByName('user_id').Value := user_id;
cmd.Execute ;