Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
When do databases automatically open with a Form?
Message
 
À
04/06/1998 10:24:32
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00104718
Message ID:
00104734
Vues:
21
>>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform