var
strMy : string;
begin
srtMy := 'This is my code.';
end;在输出的时候,在屏幕上显示的是: This is my code.
但是现在我想在屏幕上显示的是: 'This is my code'. //头和尾都多一个单引号
请问该怎么实现呢?
谢谢(只有10分了,实在不好意思)
strMy : string;
begin
srtMy := 'This is my code.';
end;在输出的时候,在屏幕上显示的是: This is my code.
但是现在我想在屏幕上显示的是: 'This is my code'. //头和尾都多一个单引号
请问该怎么实现呢?
谢谢(只有10分了,实在不好意思)
strMy : string;
begin
srtMy := '''This is my code.''';
end;
要表示 'This is my code' 这样一串字符,应该写成 '''This is my code'''。
要表示一个单引号,则写成 ''''。
insert
into MyTable
values ('Edit1.Text'); 但是在ADOQuery里面怎么写呢?
我是这么写的
ADOQuery1.SQL.Text := 'insert into MyTable values =(' '''Edit1.Text'''')';
总是不对,想求一正确的写法,谢谢
srtMy:= char(39)+'This is my code.'+char(39);第二个问题: ADOQuery1.SQL.Text := 'insert into MyTable values('+Quotedstr(Edit1.Text)+')';
char(39)...char(39) 和 Quotedstr 都是代表一对单引号哈,不要用''''容易出错
啊~~~~~~~~~`遇到知音了^-^