Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Distinguishing a table vs a view at runtime
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00458469
Message ID:
00458470
Vues:
23
>Because our programs run on several different platforms, sometimes the data will exist as a Fox table and sometimes it will exist in SQL Server. For example, sometimes there will be a Fox table called ELIGIBLE. Other times the table will be in SQL Server and there will be a remote view called ELIGIBLE. Within a program, I need to USE ELIGIBLE and then do an IF statement that determines whether the ELIGIBLE is a table vs a view.
>
>Example:
>USE ELIGIBLE
>IF ELIGIBLE (is a table)
> (do Fox table stuff)
>ELSE
> (do SQL Passthru stuff)
>ENDIF
>
>How do you check in an IF statement whether ELIGIBLE is a table vs a view?
>
>Thanks.

Look at the CURSORGETPROP() function. Specifically, the SourceType parameter.
George

Ubi caritas et amor, deus ibi est
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform