Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select statement to get table names in .dbc via ODBC
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00165543
Message ID:
00166328
Vues:
20
>>You would use the VFP SQLExec() function to send the SQL command. You would need to research the backend to determine what table(s) this information is stored in. In Oracle, there is an ALL_TABLES table where you can select table names based on criteria contained in the columns of that table. There is an ALL_OBJECTS table, all_views, ALL_SYNONYMS, ALL_TAB_COLUMNS [which is the one you would probably want in Oracle], etc. In the ALL_TAB_COLUMNS table, you have the columns of all the tables, views and clusters accessible to the user. You have the following columns in that table [Oracle 7.x]:
>>
>>OWNER, TABLE_NAME, COLUMN_NAME, DATA_TYPE, DATA_LENGTH, DATA_PRECISION, DATA_SCALE, NULLABLE, COLUMN_ID, DEFAULT_LENGTH, DATA_DEFAULT, NUM_DISTINCT, LOW_VALUE, HIGH_VALUE.
>
>That is exactly what I am looking for except that I am looking for _VFP's_ information. How does VFP store its information so that something like MS Access can read VFP table/field info? i.e: how does something other than VFP get VFP database information from VFP thru ODBC?
>

You use the ODBC Administrator to set up a DSN using the VFP ODBC driver. Then in Access, when you add a table, you set up a link to the VFP tables using the DSN you created. Access will give you the list of VFP tables to pick from. Access will read the field info for each selected table. You are going to be mostly at the mercy of the "front end" for how back-end information is retrieved and served up to you.

Access is more of a graphical interface to create stuff. Where in VFP, you can do things in code or graphically just as easily. You will have a hard time setting up anything via code in Access.
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform