Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Table is two databases
Message
From
26/06/2001 04:59:29
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00523436
Message ID:
00523441
Views:
7
>I am working out a datbase for a payroll program. This payroll program is in a multi-company environment. That means that i can select different locations for the data source. So i have three directories. Directory1, Directory2 and the System directory. I have a datadase container in directory1 for the first company and another in directory2 for the second company. The problem is that i have 5 tables in the system directory that i need to include in both database containers. So if i assign these tables in one database the other database will ask me if i would like to create a backlink for it. Even if i try to change the databse property from the dataenviroment of the form the message still pops up. Is there a way to solve this problem. Thanks...

Hi Franco,
since ther is one (1) backlink from the table to the DBC there is no way to have a table in two databases.

You may open two databases in a program so you can access the table.

To adress the Table try following
OPEN DATABASE Data1
OPEN DATABASE Data2

SET DATABASE TO Data1

USE XY_Table          &&Open XY_Table from Data1
USE Data2!KW_Table    &&Open KW_Table from Data2
If database name is not known at design time:
lcData1 = 'Data1'
lcData2 = 'Data2'

or any other way to get databases name
OPEN DATABASE (lcData1)
OPEN DATABASE (lcData2)

SET DATABASE TO (lcData1)

USE XY_Table              &&Open XY_Table from (lcData1)
USE &lcData2.!KW_Table    &&Open KW_Table from (lcData2)
This way to adress also works in SELECT SQL.
Previous
Reply
Map
View

Click here to load this message in the networking platform