strSname := 'DJJF';
strUser := 'sa';
strPw := '112233';
strt:='Provider=SQLOLEDB.1;Password='+strPw+';Persist Security Info=True;User ID='+strUser+';Initial Catalog=DTest;Data Source='+strSname+'';
strtt:='Provider=SQLOLEDB.1;Password=112233;Persist Security Info=True;User ID=sa;Initial Catalog=DTest;Data Source=DJJF';
为什么delphi会认为strt和strtt是不一样的
strUser := 'sa';
strPw := '112233';
strt:='Provider=SQLOLEDB.1;Password='+strPw+';Persist Security Info=True;User ID='+strUser+';Initial Catalog=DTest;Data Source='+strSname+'';
strtt:='Provider=SQLOLEDB.1;Password=112233;Persist Security Info=True;User ID=sa;Initial Catalog=DTest;Data Source=DJJF';
为什么delphi会认为strt和strtt是不一样的
strSname,strUser,strPw,strt,strtt:string;
begin
strSname := 'DJJF';
strUser := 'sa';
strPw := '112233';
strt:='Provider=SQLOLEDB.1;Password='+strPw+';Persist Security Info=True;User ID='+strUser+';Initial Catalog=DTest;Data Source='+strSname+'';
strtt:='Provider=SQLOLEDB.1;Password=112233;Persist Security Info=True;User ID=sa;Initial Catalog=DTest;Data Source=DJJF';
if strt=strtt then
showmessage( 'true' )
else
showmessage( 'false' );
end;end.
/////////////---------------------------
Project1
---------------------------
true
---------------------------
OK
---------------------------