>>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