procedure Tzym.N10Click(Sender: TObject);
var cn :string;
begin
denglu.close();
cn:='update renyuanbiao set login='o' where username='''+denglu.Edit1.Text+'''' ;
denglu.Query1.SQL.Add(cn) ;
denglu.Query1.ExecSQL ;close();
这个哪里有错误啊
var cn :string;
begin
denglu.close();
cn:='update renyuanbiao set login='o' where username='''+denglu.Edit1.Text+'''' ;
denglu.Query1.SQL.Add(cn) ;
denglu.Query1.ExecSQL ;close();
这个哪里有错误啊
cn:='update enyuanbiao set login=''o'' where username='''+denglu.Edit1.Text+''''; ;
denglu.Query1.SQL.Add(cn) ;
denglu.Query1.ExecSQL ;
你那个是英文o,用数字0怎么不可以啊?
我的login是char型的,长度1位
cn:='update renyuanbiao set login='+inttostr(0)+' where username='''+denglu.Edit1.Text+'''' ;
假如login是char型字段,则:
cn:='update renyuanbiao set login=''0'' where username='''+denglu.Edit1.Text+'''' ;
无论如何,首先应在第一句denglu.Query1.close;(close后的引号好象应该删除)后添加一句:
denglu.Query1.sql.clear;