@Josh
I left some stuff to render a smaller application.
1) all used var are always initialized
2) When a file with parameter-values is not found, default values are used.
3) Division by zero ? These were values that I normally enter and check.
4) The code for the button is working as it should.
Why is that not present,
I left all stuff till it should work.
Be aware that the sources I send are a grabage-collection, a base without any control.
@Josh @rvk
This night I did the proposal stripping all stuff in the pas-source (Put in comment).
And yes, suddenly I could run it again on the Laptop ! I put the same garbage-written source on the PC and as I expected ir run there too.
Finally I found the place were things go wrong.
As the little app must serve to access several database I try to modify the SQLConnection.
While developing it is set to into the component. This permits to see all needed info while developing (fdatafields ...)
When you choose another database (in setup) I close all connection and enter a new databasename and reopen the connection.
Strange, on the PC this runs !! however, on the Laptop this causes the strange behavour.
You try to run and all is compiling correctly, BUT, the app pops up and closes directly without any error ..
The new, read other databasename is stored in the 'parameter'-file and the default is fe 'test' which works correct.
This parameter can been entered in setup and is the edit-component 'foto_base'
At startup 'rerun) the stored value is entered in the SQLconnection-component. This gives no error, but the application does not give focus on the Laptop. The app pops up and closes immediately. On the PC however it continues and there I get focus, but now I see that it does not change to another database if requested.
MasterQuery.Close;
MasterQuery.Active := False;
MasterSQLTransaction.Active := False;
DBConnection.Connected := False;
DBConnection.d
// DBConnection.DatabaseName := foto_base.Text;
DBConnection.HostName := 'Localhost';
DBConnection.UserName := 'root';
DBConnection.Connected := True;
MasterSQLTransaction.Active := True;
MasterQuery.Active := True;
For Information. The application is for the moment a kind of POC, because I'll have to adap some components (new components) so they act as I, we want. But before starting the real app, I must be sure that what we wish is possible and acts as we hope ... So sorry if it looks like a program which should never have been made. And I now, sometimes that may be dangerous. No errorchecks, ....
Now I'll look further why I can't change that database.
Meanwhile I do not understand why on the PC it runs and gives focus, on the Laptop it runs too but closes.