Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Table is two databases
Message
De
26/06/2001 04:59:29
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00523436
Message ID:
00523441
Vues:
8
>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform