At 12:48 PM 11/5/2013, Dan Goldberg wrote:

I am trying to figure out the best practice for compiled apps.

I have a compiled app that users open. It is an external form file that is ran.

The question is should I:

1. connect to the database when they open the app and leave it connected until
   they close the app.

or

2. open the app and stay disconnected. When they click on something on the app,
   connect to the database, process, and when it is done disconnect.

Right now I use option 1 but from time to time the database gets corrupted. I am thinking maybe to do option 2 but do not know how that will work or if it will
solve the corruption problem.


Dan,

Excellent question!

Let me send you a personal invite to www.join.me/RazzakMemon to show you the
practical approach and advantages of using option #2 to deploy an R:Compiled
R:BASE eXtreme 9.5 (32/64) application in a multi-user environment.

Using this approach you may also include all database maintenance and backup
routines in External Form File (.rff), if you wish.

Technically, you will have to define a Custom Form Action in External Form
File, for example:

-- Custom Form Action: CheckDBConnection (Check Database Connection)

IF (CVAL('DATABASE')) <> 'RBU_SAT' OR (CVAL('DATABASE')) IS NULL THEN
   CONNECT RBU_SAT IDENTIFIED BY NONE
ENDIF
RETURN

Then, add the following code for each TreeView Node, TreeView Item, Button,
etc., that involves the database connection.

PROPERTY RBASE_FORM_ACTION CheckDBConnection ' '
-- continue with the code ...

Hope that helps!

Feel free to reach out to me with any questions.

Very Best R:egards,

Razzak

www.rbase.com
www.facebook.com/rbase
--
30+ years of continuous innovation!
15 Years of R:BASE Technologies, Inc. making R:BASE what it is today!
--


Reply via email to