Where should I open tables & do this?

Topics: Developer Forum
Aug 1, 2013 at 8:53 PM
Where do you suggest I open up 4 or so tables and set relations to these tables so I can use them later in my master controller programs that return json. I don't want to open the tables more than once, etc. Do I put them in main.prg and just check and make sure they aren't open already?
Coordinator
Aug 1, 2013 at 9:17 PM
No, if you're using a Controller, main.prg never gets called.

I would open them in either the Init method of your Controller Class or a custom method of your Controller class.