Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Database Usage Questions

Status
Not open for further replies.

IForgot

Programmer
Mar 20, 2002
122
US
Here are 2 related questions concering use of Databases within an application.

1. Can more than a single Database be concurrently open at the same time?
2. If so, is there a way to Close one (and only one) of them when no longer needed?

Thanks,
I_Forgot
 
Sure

Open Database DataBase1
Open DataBase DataBase2

Use DataBase1!FileName in 0 Alias File1
Use DataBase2!FileName in 0 Alias File2

Sele File2
do some stuff

Use in File2

Close database DataBase2 && Closes database2




Ali Koumaiha
TeknoSoft Inc
Farmington Hills, Michigan
 
OK, I can Open multiple Databases concurrently. I thought this was true.

I've known about about USE'ing the multiple associated tables for a good while.

But in my VFP7 when I attempt to
CLOSE DATABASE DATABASE2
I get an error message:
Command contains unrecognised phrase/keyword

I also notice that the Intellisense prompt which comes up when I am entering the CLOSE DATABASE command contains only the option [ALL] This would typically indicate that no other Expression is allowed.

Any other suggestions on CLOSE'ing a single Database?

Thanks,
I_Forgot
 
CLOSE DATABASES by itself closes the current DB and leaves the other(s) open. CLOSE DATABASES ALL closes them all.

Brian
 
IForgot

But in my VFP7 when I attempt to
CLOSE DATABASE DATABASE2
I get an error message:
Command contains unrecognised phrase/keyword


As baltman suggests try:
SET DATABASE TO myDatabase1
CLOSE DATABASES

This should only close the current database.


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top