Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Server view info available?
Message
From
31/01/2005 10:54:09
Gary Foster
Pointsource Consulting LLC
Chanhassen, Minnesota, United States
 
General information
Forum:
Visual FoxPro
Category:
Client/server
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Miscellaneous
Thread ID:
00981936
Message ID:
00982263
Views:
28
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
>
>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform