procedure TForm1.FormCreate(Sender: TObject);Var Str,nStr:String; UserName,Pwd:String; Index,Index2:Integer;begin Str:=ADOConnection1.ConnectionString; nStr:=UpperCase(Str); Index:=Pos( UpperCase('User ID'), nStr); while (Index<Length(nStr)) and (nStr[Index]<>'=') do Inc( Index); Inc(Index); Index2 := Index+1; while (Index2<Length(nStr)) and (nStr[Index2]<>';') do Inc( Index2); UserName := Copy(Str,Index, Index2-Index); Index:=Pos( UpperCase('Password'), nStr); while (Index<Length(nStr)) and (nStr[Index]<>'=') do Inc( Index); Inc(Index); Index2 := Index+1; while (Index2<Length(nStr)) and (nStr[Index2]<>';') do Inc( Index2); Pwd := Copy(Str,Index, Index2-Index); caption:= UserName +' '+Pwd;end;