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是不一样的

解决方案 »

  1.   

    var
      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   
    ---------------------------
      

  2.   

    你怎么知道delphi会认为strt和strtt是不一样的