>Hi Guys,
>
>Is it possible to create a program that will list all of the remote views that uses a field I specified? or perhaps a table name that I specify?
>
>
>For example I have a field on my table items.oldField, I want to delete this field since it is no longer used in the system. I want to generate a list of all of the remoteviews that accesses this field so I may remove it from the view so that it won't produce an error if the view is used in the program.
>
>Any Idea?
>
>Thanks in advance.
m.lcDBC = "myDBC"
m.lcField = "oldField"
m.lcTable = Lower('Items')
Open Database (m.lcDBC)
Local ix
For ix=1 To Adbobjects(aViews,"VIEW")
If DBGetProp(aViews[m.ix],"VIEW","SourceType") = 2 ;
and m.lcTable$Lower(DBGetProp(aViews[m.ix],"VIEW","Tables")) ;
and Indbc(aViews[m.ix]+'.'+m.lcField,"FIELD")
? m.lcField+" exist in view "+aViews[m.ix]
Endif
Endfor
PS: You also check SQL explicitly I think because if you explicitly renamed its name then this wouldn't work.
Cetin