Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Server view info available?
Message
De
31/01/2005 10:54:09
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:
00982263
Vues:
27
Sergey,
No, not in this case. I'm not using a DBC remote view, I'm using SPT and need info directly fro SQL Server. I've started down a path somewhat along the lines of your first suggestion by pulling the sql from syscomments and parsing it.

Thanks for the suggestions.

Gary

>>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
>
>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform