Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SET DATABASE command
Message
De
05/12/2005 17:53:52
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01074980
Message ID:
01075146
Vues:
33
>>>Thanks in advance.
>>
>>Nadya,
>>I believe this is a false alarm and you have code causing it to happen.
>>Cetin
>
>We have code that opens database. We were testing DBC(). Prior to the command SET DATABASE TO mmVisCollect the DBC() functions returned T:\IT_Testing\Data\MMVisCollect.DBC Right after that statement DBC() returned c:\MMVisCollect\Data\MMVisCollect.DBC. In other words, SET DATABASE TO myDatabaseName caused the local database to be used instead of the network database.
>
>I'm going to post another thread in MereMortals category, because this is a very dangerous problem and situation for us.
>
>Thanks.

Naomi,
the situation is worse
CLEAR

MD temp1
MD temp2
CREATE DATABASE temp1\dbc1
CREATE DATABASE temp2\dbc1
CLOSE DATABASES all



open DATABASE temp1\dbc1
open DATABASE temp2\dbc1

? "first return name only !!!"
FOR k=1 TO ADATABASES(adbc)
? adbc[k]
NEXT
SET DATABASE TO dbc1
? "selected  the last opened !!  ",DBC()
CLOSE DATABASES all

?
? " revert order"

open DATABASE temp2\dbc1
open DATABASE temp1\dbc1
? "first return name only !!!"
FOR k=1 TO ADATABASES(adbc)
? adbc[k]
NEXT
SET DATABASE TO dbc1
? "selected  the last opened ",DBC()
CLOSE DATABASES all
the solution is one only:
open DATABASE temp2\dbc1 ALIAS blabla
set database to blabla
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform