Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DataBase old , and new database
Message
De
29/09/2003 15:07:21
 
 
À
29/09/2003 14:29:20
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00833249
Message ID:
00833269
Vues:
20
e.g.
*-- open databases - references are for switching between the two, 
*  especially if the two db's have the same name
Open database myNewDatabase
lcNewDB=DBC()

Open database myOldDatabase
lcOldDB=DBC()
ADBObjects(laOld,"Table") && get list of table names from old database

set database to (lcNewDB)
For Each lcTable in laOld
  *-- see if it's in the new database
  If InDBC(lcTable,"Table")
    Use (lcNewDB+"!"+lcTable) alias old_table
    Select 0
    use (lcTable) alias new_table
    append from dbf("old_table")
    *-- clean up as you go
    use in new_table
    use in old_table
  EndIf
Next
>Hi
>
>i want make this
>Thanks
>
>For each table in my new DataBase
>
>See if exist one table with the same name in my old Database
>
>If yes
>
>append for table of new database from table of old database
>
>Else
>
>Endif
Insanity: Doing the same thing over and over and expecting different results.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform