Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
When do databases automatically open with a Form?
Message
 
To
04/06/1998 10:24:32
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00104718
Message ID:
00104734
Views:
20
>>I have a form with a dataenvironment including a single table from a database. As part of my field level validation error handling, I attempt to use DBGETPROP(). However, I am given a message that there is no current database. I would like to avoid have to perform a SET DATABASE TO. In the VFP documentation, it says "Visual FoxPro may automaticaly open databases when a query or a Form is executed." I wish it would automatically open instead of may open! *g* Can anyone give me some insight?
>Jerry,
>Unfortunately my way is checking if dbc open and if not open it. It isn't opened by default. Here is my code doing it :this.freetable = empty(cursorgetprop("Database",this.recordsource))
>if !this.freetable
> if !dbc()=cursorgetprop("Database",this.recordsource)
> open database (cursorgetprop("Database",this.recordsource))
> endif
>* My other code continuesCetin

Thank You, this looks like it will work. I'll give it a try.
Nebraska Dept of Revenue
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform