Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What DBC is current DBF contained in ?
Message
 
 
À
04/09/2001 11:05:30
Patrick O'Neil
American Specialty Information Services
Roanoke, Indiana, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00552066
Message ID:
00552100
Vues:
22
This message has been marked as the solution to the initial question of the thread.
>if open a table that is contained in a database (but i do not know
>which one), is there a way to find out what the "containing database
>pointer" is ?
>
>is there a way to update that pointer ?

This will do it:
if empty(dbf())
   return ""
endif
local lcDBC, lnRetVal, llFound, lcCurDBC, laDBCs[1]
lnRetVal = ADATABASES(laDBCs)
lcCurDBC = SET('database')
FOR EACH lcDBC IN laDBCs
   SET DATABASE TO (lcDBC)
   IF INDBC(JUSTSTEM(JUSTFNAME(DBF())), 'Table')
      llFound = .t.
      EXIT
   ENDIF
ENDFOR
SET DATABASE TO (lcCurDBC)
CLEAR
if not llFound
   lcDBC = ""
endif
RETURN lcDBC
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform