Hello,
I just created a new project and thought it would make sense to open the database using an “Open” Event Handler. Seems to work okay until I created a button on the form to get the Table Schema. Xojo keeps telling me there is no database opened by the name given to the TableSchema command.
Is there some caution about events not being global?
I moved the TableSchema under the open event and it worked fine there.
OPENING the database that way is fine…
the question is where did you DIM the database???
If that is also in the open event… the it goes out of scope the instant that event completes.
You were right about how I had the DIM setup. I now have setup a Property on the app of DB as OracleDatabase with a Scope of Public. That part seems to work there because I haven’t had to declare it anywhere else.
I created a button with an Activate action that contains the Oracle connection information and it works if I click the button.
But how can I have the Oracle connection take place when the app launches? I tried creating an Open Event Handler to do this but now it complains that the DB item doesn’t exist.
[quote=343352:@Jeff Ridder]With it setup this way I get
“This item does not exist
if CLIPS.Connect then”[/quote]
If you put a property in app, you must namespace it: