N
netpacific
Unregistered / Unconfirmed
GUEST, unregistred user!
运用Tquery更新数据库出错
信息如下
“operation can not applicable".
tquery中sql语句如下
update proxyacct.user_mflow set curr_tot_fee=:curr_tot_fee where
user_name=:user_name
proxyacct.user_mflow为网络数据库,curr_tot_fee为字段名。:curr_tot_fee,:user_name为参数
procedure TForm1.Button1Click(Sender: TObject);
begin
with Query1 do
begin
database1.StartTransaction;
Close;
Unprepare;
ParamByName('curr_tot_fee').asfloat := strtofloat(edit1.text);
ParamByName('user_name').asstring := 'dengt';
Prepare;
open;
database1.commit;
end;
end;
不知是不是要设置tquery的某些属性,请高手指点!
信息如下
“operation can not applicable".
tquery中sql语句如下
update proxyacct.user_mflow set curr_tot_fee=:curr_tot_fee where
user_name=:user_name
proxyacct.user_mflow为网络数据库,curr_tot_fee为字段名。:curr_tot_fee,:user_name为参数
procedure TForm1.Button1Click(Sender: TObject);
begin
with Query1 do
begin
database1.StartTransaction;
Close;
Unprepare;
ParamByName('curr_tot_fee').asfloat := strtofloat(edit1.text);
ParamByName('user_name').asstring := 'dengt';
Prepare;
open;
database1.commit;
end;
end;
不知是不是要设置tquery的某些属性,请高手指点!