S
sxhz
Unregistered / Unconfirmed
GUEST, unregistred user!
我在中间层定义了个函数
function Tclass_gl.date(const oldpass, newpass: WideString): OleVariant;
begin
adoquery1.Close;
adoquery1.SQL.Clear;
adoconnection1.Close;
//adoconnection1.ConnectionString:='Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=company;Data Source=JX ';
adoconnection1.Connected:=true;
ADOQuery1.SQL.Add('update admin set password = '+quotedstr(newpass)+
'where number = (select number from admin where password='+quotedstr(oldpass)+')');
adoquery1.Open;
result:=1;
end;
然后在客户端调用 socketconnection.appserver.date(edit1.text,edit2.text);
但是总是提示灾难性错误
为什么
function Tclass_gl.date(const oldpass, newpass: WideString): OleVariant;
begin
adoquery1.Close;
adoquery1.SQL.Clear;
adoconnection1.Close;
//adoconnection1.ConnectionString:='Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=company;Data Source=JX ';
adoconnection1.Connected:=true;
ADOQuery1.SQL.Add('update admin set password = '+quotedstr(newpass)+
'where number = (select number from admin where password='+quotedstr(oldpass)+')');
adoquery1.Open;
result:=1;
end;
然后在客户端调用 socketconnection.appserver.date(edit1.text,edit2.text);
但是总是提示灾难性错误
为什么