Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using Multiples databases from a single form
Message
 
To
13/01/1999 11:07:01
Noman Aftab
Embry-Riddle Aeronautical University
Daytona Beach, Florida, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00175474
Message ID:
00175482
Views:
29
>Hi evereyone!
>I have a form where I have three buttons so that I can access info from separate databases each time. The problem is how can I open each database for each click and close the ones not in use. Do i need to add all the tables from all databses to the data environment. Actually these databses have same tables, stucture-wise and name-wise, but databse names are different.
>PLEASE HELP!

Are you extracting information from the tables with Select statements, or are the tables/fields bound to specific controls on the form.

If select statements to get data, you can prefix the tables with the dbc to get the proper data.
if button1 clicked
   lcDBC = "DBCName1"
else
   lcDBC = "DBCName2"
endif
select a.fld1, a.fld2, a.fld3;
   from ( lcDBC + "!AnyTable" ) a;
   where a.fld1 = cond....
If the data is bound, you are looking at a more difficult solution that is workable but may not be as simple as you might desire.
Previous
Reply
Map
View

Click here to load this message in the networking platform