Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DBUSED INDBC - I don't understand
Message
From
15/05/2012 18:47:34
 
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01543623
Message ID:
01543648
Views:
64
>This line generates an error: No database is open or set as the current database (Error 1520). Please note that it is generated by the 2nd part, the INDBC() function. I used the 1st part, the DBUSED() function, to prevent that from happening.

yes, you are right, DBUSED() only tells you that the database is open. To determine if it is the current database use:
IF SET('DATABASE') != lcMyDatabaseName
    SET DATABASE TO (lcMyDatabaseName)
ENDIF
Previous
Reply
Map
View

Click here to load this message in the networking platform