Skip db file opening when procedure starts (window)
Skip db file opening when procedure starts (window)
(OP)
Hello
I use postgresql as database backend. When program starts user can pick/add/edit database he wants to work with (main, testing, develop ...). I use table{PROP:Owner} to set connection string.
Problem is when window opens and table{PROP:Owner} is empty error "File not found (2)" occurs and kills apps. Can you help me to find solution to skip file checking ?
(Clarion 7.3 (ABC))
Best regards,
Mariusz
I use postgresql as database backend. When program starts user can pick/add/edit database he wants to work with (main, testing, develop ...). I use table{PROP:Owner} to set connection string.
Problem is when window opens and table{PROP:Owner} is empty error "File not found (2)" occurs and kills apps. Can you help me to find solution to skip file checking ?
(Clarion 7.3 (ABC))
Best regards,
Mariusz
RE: Skip db file opening when procedure starts (window)
Assuming that you have a window procedure to choose the database, call that procedure at the beginning of the main procedure/app frame i.e. WM.Init - first embed.
Ideally, you should not bypass file opening but if you really want to do so, click on Source in the embed editor and you can see all the embed points. Place an OMIT('***SKIP***') in the embed before the tables are opened and a ***SKIP*** in the embed after the table opening. If other statements other than the table opening ones are being skipped, copy them after the ***SKIP*** line. And, after the user chooses the Database, you should execute the table opening commands you omitted.
Regards
RE: Skip db file opening when procedure starts (window)
ShankarJ : Assuming that you have a window procedure to choose the database, call that procedure at the beginning of the main procedure/app frame i.e. WM.Init - first embed.
... and after choosing database window I'll run source procedure ( which doesn't open files ) to check if connection is correct and let init continue.
or ...
Is there a way to open file (defined in dictionary) manually without adding it to other files tree?
Mariusz
RE: Skip db file opening when procedure starts (window)
The code is ::
CODE
Relate:<TableName>.Open()
There is also a individual table opening method ::
CODE
Could you post the generated code of the WM.Init method so that I can give you specific advice?
Regards