How to create global variables init procedure ?

Hello,

I would like to know how to create a procedure which initialize global variables when I start my project.

I try this but it doesn’t work :

  • in project library I place a function which initialize variables from a parameter table in database
  • in my menu application , in OnApplicationInit I add a call of this function

The error message is "Connection to database error " because there is no DB acces in menu application !!!
If, I check my library in Application Library, I cannot save due to the same db error

Thanks in advance

If you need access to the database then you need to use the onload event.

Using a function call (located in a project library) in On Applicationinit, onexecute or onload in MENU application , the message is “Connection or database access profile undefined”, because in MENU application there is no SQL connection.

How to add it or how to do it in an another way

Thanks

If you have a default application in your menu you could declare your vars there. I useually do that in my logon page.

Ok, I see what you mean !!

I’ll try it but I think this solution will be resolve my problem

Thank you