Sql.Add('Select eng_name as 货品名称,part_code as 电脑编号 from SysItem where part_grp_code=' + QuotedStr(SFG)
+' or Part_grp_code=' + QuotedStr(FDG)
+' order by eng_name');
+' or Part_grp_code=' + QuotedStr(FDG)
+' order by eng_name');
没找到QUOTEDSTR这个函数或方法呀
with frmDmEng.AQryItems do
begin
close;
Sql.Clear;
Sql.Add('Select eng_name as 货品名称,part_code as 电脑编号 from SysItem where part_grp_code=''SFG'' or Part_grp_code=''FDG'' order by eng_name');
PrePared;
Open;
end;
以下是delphi6自带help描述QuotedStr function
Returns the quoted version of a string.UnitSysUtilsCategoryString handling routinesfunction QuotedStr(const S: string): string;DescriptionUse QuotedStr to convert the string S to a quoted string. A single quote character (') is inserted at the beginning and end of S, and each single quote character in the string is repeated.Note: When working with multi-byte character systems (MBCS), use AnsiQuotedStr instead.
Sql.Add('Select eng_name as 货品名称,part_code as 电脑编号 from SysItem where part_grp_code='''+IntToStr(SFG)+''' or Part_grp_code='''+IntToStr(FDG)+''' order by eng_name');
调试成功的,快给分