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
>
>