V
vpt
Unregistered / Unconfirmed
GUEST, unregistred user!
SQL Server数据库,在delphi中做查询,
admin是一个varchar属性的列,我要显示admin是tester1的列,但是下面的写法编译通不过。为什么?
procedure TForm1.Button2Click(Sender: TObject);
begin
With Query1 do
begin
Close;
SQL.Clear;
SQL.Add('select * from messagetable');
SQL.Add('Where Admin='Tester1'');
open;
end;
end;
admin是一个varchar属性的列,我要显示admin是tester1的列,但是下面的写法编译通不过。为什么?
procedure TForm1.Button2Click(Sender: TObject);
begin
With Query1 do
begin
Close;
SQL.Clear;
SQL.Add('select * from messagetable');
SQL.Add('Where Admin='Tester1'');
open;
end;
end;