Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
procedure TForm1.Button1Click(Sender: TObject);
var
str : String; // string processing area
intLen, // length of a string
intPos : Integer; // position in a string
const
k_NAME = 'SourceDB='; // Setting we're after.
k_DELI = ';'; // Delimiter
begin
str := ADOTable1.Connection.ConnectionString;
// Trim the stuff before the setting we're after.
intLen := length( str );
intPos := pos( k_NAME, str );
str := copy( str, intPos + length( k_NAME ), intLen );
// Trim the stuff after the setting we're after.
intPos := pos( k_DELI, str );
str := copy( str, 1, intPos - 1);
// Handle the result.
showMessageFmt( '%s is located in %s.',
[ AdoTable1.TableName, str ] );
end;