Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Server view info available?
Message
 
 
À
28/01/2005 18:24:16
Gary Foster
Pointsource Consulting LLC
Chanhassen, Minnesota, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Divers
Thread ID:
00981936
Message ID:
00981959
Vues:
30
>Hi,
>I wonder if there is a way to get table.field info from a SQL Server view. Specifically, I want my framework to restrict users from trying to update fields that aren't part of the "base" table. SqlColumns() doesn't show me which fields come from what table, which is what I need. Thanks.
>
Hi Gary,

Would something like this work for you?
SELECT mySQLview
lcSql = CURSORGETPROP("SQL")
lcFiledList = STREXTRACT(lcSql, "SELECT", "FROM",1, 1)
=ALINES(laFieldList, lcFiledList,.t., ",")
* or
SELECT mySQLview
=AFIELDS(laList)
FOR i= 1 TO ALEN(laList,1)
	? DBGETPROP("mySQLview." + laList[i,1], "Field", "UpdateName")
ENDFOR
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform