Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Question: How to get Table Name? Filename different
Message
De
31/03/2004 12:36:52
 
 
À
31/03/2004 12:30:36
Donald Lowrey
Data Technology Corporation
Las Vegas, Nevada, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00891219
Message ID:
00891221
Vues:
20
>Good morning all
>
>I may be brain dead this morning.
>
>A contained table has a filename of xyegf.dbf. However, the table name is mytable.
>The table is opened with "USE xyegf IN 0 ALIAS myalias"
>The problem arises as the bit of code is looping and thru each pass of the loop the alias is always "myalias". No other tables are open.
>
>This fails, because the file name is not in the dbc.
>DBGETPROP("xyegf","table", "primarykey")
>
>This works
>DBGETPROP("mytable","table", "primarykey")
>
>DBF() does not help, because it returns the file name.
>
>So what I need help with, is a way to return the table name.
>
>Thanks in advance for your help.
>
>Don Lowrey


Maybe there is an EZr way but you could do
= ADBOBJECTS(la_table,'table')
FOR EACH lc_table IN la_table
   IF FULLPATH(DBGETPROP(lc_table,"Table","Path")) = DBF()
      ? lc_table
      EXIT
   ENDIF
ENDFOR
Charles

"The code knows no master." - Chuck Mautz
"Everybody is ignorant, only on different subjects." - Will Rogers
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform