Solved Modules in Front End or in Backend (1 Viewer)

silentwolf

Active member
Local time
Today, 05:35
Joined
Jun 12, 2009
Messages
575
Hi guys,

just wondering where the Modules need to be in regards of a backEnd and FrontEnd Database?

Is the Backend only Tables and all other things going into the FrontEnd?

I did it manually so the relationships are staying as they where created.

Cheers

Albert
 

theDBguy

I’m here to help
Staff member
Local time
Today, 05:35
Joined
Oct 29, 2018
Messages
21,474
Yes, BE should mostly only contain the tables/data. The FE contains all the logic and user interface.
 

silentwolf

Active member
Local time
Today, 05:35
Joined
Jun 12, 2009
Messages
575
Hi DBguy,

thank you for your reply!!

Cheers
 

isladogs

MVP / VIP
Local time
Today, 13:35
Joined
Jan 14, 2017
Messages
18,235
Directly answering your point about relationships.
These are done in the BE where tables are stored so that referential integrity can be applied.

Adding relationships in the FE is pointless as R.I. cannot then be enforced
 

silentwolf

Active member
Local time
Today, 05:35
Joined
Jun 12, 2009
Messages
575
I did build the relationship in the BE with referential integrity.
Maybe I did not explain myself correctly in that regards )

But it all seams to be working so I guess it should be ok.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 07:35
Joined
Feb 28, 2001
Messages
27,191
By default, when you activate a module, it looks in the FE file because... that is where Workspace(0) is located. All code to be executed occurs where the workspace occurs. It IS possible to put code in the BE file but to use it you would have to qualify it by the module name - since in that case it would not be the default module location.
 

silentwolf

Active member
Local time
Today, 05:35
Joined
Jun 12, 2009
Messages
575
Oh ok,

Many Thanks Doc :)

I looked and I still had also the modules in the BE Database which I deleted now!
Because of doing it manually I did forget about deleting all the modules as well.

So I guess it should now be running as usual now.

Cheers for your help!

Albert
 

isladogs

MVP / VIP
Local time
Today, 13:35
Joined
Jan 14, 2017
Messages
18,235
By default, when you activate a module, it looks in the FE file because... that is where Workspace(0) is located. All code to be executed occurs where the workspace occurs. It IS possible to put code in the BE file but to use it you would have to qualify it by the module name - since in that case it would not be the default module location.
Sorry Doc but that is inaccurate.
Whilst you can link to tables in the BE, you cannot directly link to other objects such as modules.

In order to use modules from another database you either need to import them OR add the external database as a library reference or as an add-in.
In each case, the module can then be handled as part of the FE.
You do NOT need to preface the procedure with the module name.

In fact, the only time you ever need to preface with the module name. is if you have two procedures with exactly the same name.
It is then SOMETIMES necessary to disambiguate which procedure to use (even then NOT always so ...)

Of course, much better to avoid that situation in the first place as it will cause issues with compiling & prevent an ACCDE file being created
 

Users who are viewing this thread

Top Bottom