1 (edited by dan.hdez.rdez 2020-08-02 07:55:53)

Topic: Proyect: load excel mysql and fix menus

Very good day,

I need your help, I am learning with this great software, I am really dummy, I would be very grateful if you could help me:


1.- That the import from an excel that is in the form1 can have it in the forminicio page tab colima.
2.-My project does not request the connection data to mysql, every time I try to test it asks for the connection data.
3.- know if it is possible to eliminate the start menu or remove the about and other menus at the top.



I would greatly appreciate your help, attached the project.

Iam from Mexico

Post's attachments

Attachment icon Rex.rar 588.16 kb, 231 downloads since 2020-08-02 

Re: Proyect: load excel mysql and fix menus

dan.hdez.rdez,

1.- That the import from an excel that is in the form1 can have it in the forminicio page tab colima

Not sure what you mean here. But since we don't have access to your MySql database we'll have to try to test with Sqlite. Do you have a copy of your Excel spreadsheet that you can upload for us to use.


2.-My project does not request the connection data to mysql, every time I try to test it asks for the connection data.

You can connect through script by doing the following:

procedure Form1_OnShow (Sender: string; Action: string);
begin
     frmWait.Show;
     Application.ProcessMessages;

     {$MySQL disable_connectdialog}
     Form1.MySQLConnection.Server := '127.0.0.1';
     Form1.MySQLConnection.Port := 3306;
     Form1.MySQLConnection.Username := 'root';
     Form1.MySQLConnection.Password := 'root';
     Form1.MySQLConnection.Database := 'mvd';

     try
         Form1.MySQLConnection.Connect;
     except                                                                    
         frmWait.Close;
         ShowMessage('Can''t connect to database.');
         Form1.Close;
     end;

     if Form1.MySQLConnection.Connected then
     begin
         UpdateDatabase(''); // to fill ComboBoxes
         Form1.GridEmployees.dbUpdate; // if you have TableGrid on first form with option "Enable auto execution", you should call method dbUpdate manually
     end;
     frmWait.Close;
end;

3.- know if it is possible to eliminate the start menu or remove the about and other menus at the top.

To remove the standard menus in MVD you can use the following script:

Form1.mniFile.visible := false;
Form1.mniClose.visible := false;
Form1.mniOptions.visible := false;
Form1.mniSettings.visible := false;
Form1.mniReport.visible := false;
Form1.mniExportData.visible := false;
Form1.mniImportData.visible := false;
Form1.mniAbout.visible := false;