Source language: Translate to:

General questions

Questions about our Advanced Database plug-in

Moderator: Neosoft Support

General questions

Postby stu » Mon Apr 18, 2016 10:20 am

Hi,

I have used DBPro for a fair bit and every time I start a new project same questions come to mind and always forget to ask... Not today...

So, I always go by creating a starting sequence on a SubRoutine and that more or less go like:

Code: Select all
:ConnectToDatabase
dbpopendatabase "MyNewProject" "[ConnectionString]"
dbpOpenTable "MyNewProject" "Table1" ""
dbpOpenTable "MyNewProject" "Table2" ""
dbpOpenTable "MyNewProject" "Table3" ""
dbpOpenTable "MyNewProject" "Table4" ""
Return


So you see, I open all the tables on startup, is this the way we're supposed to work with the plugin or should we Open/Close the tables per particular case according to the task that's gonna take place?

Soon after (if not straight after that I start creating the grids that I'll be using. Again, is that something that is supposed to happen (create all grids on startup) or is it something one should address just before displaying a grid (eg: entering a page) and then close the grid when no longer needed (eg: exiting the page)

Regards
User avatar
stu
 
Posts: 320
Joined: Wed Aug 07, 2013 11:37 am

Re: General questions

Postby Gaev » Mon Apr 18, 2016 6:12 pm

Stu:

So you see, I open all the tables on startup, is this the way we're supposed to work with the plugin or should we Open/Close the tables per particular case according to the task that's gonna take place?

I think the answer depends on ..

- the number of tables that the application (pub) deploys
- the local/remote location of the databases
- the number of records in the tables

In the end, I would say that open them all at the start (makes for easier management and removes the possibility of a not-opened-table condition) unless ...

a) you find that the startup delay is unacceptable to the user
b) you have many tables that are hardly deployed in a typical run of the program
c) your program is going to be run on your granpa's (circa 1999) computer (i.e. less memory and processor capability than machines of the last 5 to 8 years)

Soon after (if not straight after that I start creating the grids that I'll be using. Again, is that something that is supposed to happen (create all grids on startup) or is it something one should address just before displaying a grid (eg: entering a page) and then close the grid when no longer needed (eg: exiting the page)

Same answer as above.

In addition, your application may have reason to open different grids (columns) under different conditions.
User avatar
Gaev
 
Posts: 3735
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada


Return to NeoBookDBPro

Who is online

Users browsing this forum: No registered users and 1 guest