Topic: New version 4.2

New version 4.2


Download: http://myvisualdatabase.com/download/myvisualdb.exe




What's new?


- Add markers to the map using the form, with additional data.
examples: http://myvisualdatabase.com/forum/viewt … ?pid=23960


- Added classes  TWebGMapsGeocoding and TWebGMapsReverseGeocoding.
examples:
http://myvisualdatabase.com/forum/misc. … download=1
http://myvisualdatabase.com/forum/misc. … download=1


- Adding variables to a report using a script.
example:

procedure Form1_ButtonReport_OnClick (Sender: TObject; var Cancel: boolean);
begin
    Form1.frxReport.Variables.Clear;
    Form1.frxReport.Variables[' ' + 'My Category 1'] := Null;
    Form1.frxReport.Variables['My Variable 1'] := 10;
    Form1.frxReport.Variables['My Variable 2'] := 20;
    Form1.frxReport.Variables['My Variable 3'] := '''Hello''';
end;


- Added function ShowRecordEx to populate form from another MySQL connection
example:

var
    MySQL: TMyConnection;

procedure Form1_Button1_OnClick (Sender: TObject; var Cancel: boolean);
begin
    if MySQL.Connected then
    begin
        ShowRecordEx(frmAddEdit, 'tablename', 1, MySQL); // 1 - id of record in the table
    end;
end;


procedure Form1_OnShow (Sender: TObject; Action: string);
begin
  MySQL := TMyConnection.Create(Form1);
  MySQL.Options.UseUnicode := True;
  MySQL.Server := '127.0.0.1'; // ip address of MySQL server
  MySQL.Port := 3306;
  MySQL.Username := 'username';
  MySQL.Password := 'password';
  MySQL.Database := 'databasename';
  MySQL.LoginPromt := False;

  try
      MySQL.Connect;
  except
      ShowMessage('Can''t connect to database.');
  end;
end;

procedure Form1_OnClose (Sender: TObject; Action: string);
begin
    MySQL.Disconnect;
    MySQL.Free;
end;


- Added function GetEnvironmentVariable
example:

procedure Form1_Button1_OnClick (Sender: TObject; var Cancel: boolean);
var
    s: string;
begin
    s := GetEnvironmentVariable('HOMEPATH');
    ShowMessage(s);
end;

List of Environment Variables in Windows OS
https://www.askvg.com/list-of-environme … sta-and-7/



- Added method GetElementById for class TWebBrowser
example:

procedure Form1_Button1_OnClick (Sender: string; var Cancel: boolean);
begin
    Form1.Edit1.Text := Web.GetElementById('radio1', 'value');
end;


- Bug fixes.

Dmitry.