Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Skip db file opening when procedure starts (window)

Status
Not open for further replies.

uniglass

Programmer
Jul 21, 2010
27
PL
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

 
Hi!

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
 

[small] 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.[/small]

... 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
 
Hi Mariusz,

The code is ::

Code:
Relate:<TableName>.SetOpenRelated() 
Relate:<TableName>.Open()

There is also a individual table opening method ::

Code:
Access:<TableName>.Open()

Could you post the generated code of the WM.Init method so that I can give you specific advice?

Regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top