急!!一个奇怪的结果,都进来看看''''四单引号的变单引号(50)

W

wlyft

Unregistered / Unconfirmed
GUEST, unregistred user!
function reACidsql(wlistbox:tlistbox):string
var i:integer
tmpstr:string;begin // ','''+edit1.Text+'''' tmpstr:=''
for i:=0 to wlistbox.Count -1 do if wlistbox.Selected then begin if length(trim(tmpstr))>0 then tmpstr:=tmpstr+','''+wlistbox.Items.Strings+'''' else tmpstr:=''''+wlistbox.Items.Strings+''''
showmessage(tmpstr)
end
if length(trim(tmpstr))>0 then //当有选取,才有句子 begin tmpstr:=' (accountid in('+tmpstr
tmpstr:=tmpstr+'''))'
//showmessage('>> '+tmpstr)
end
result:=tmpstr;end;本来想得出(accountid in(''aa'',''bb'',''cc'')) '结果是(accountid in('aa','bb','cc'')) '前面都变成单引号了急
 
S

szhcracker

Unregistered / Unconfirmed
GUEST, unregistred user!
再多加几个'号即可。
 
W

wlyft

Unregistered / Unconfirmed
GUEST, unregistred user!
自已搞错了,tmpstr:=tmpstr+'''))';改成tmpstr:=tmpstr+'))';就行了
 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
I
回复
0
查看
640
import
I
顶部