>Hi All ,
>I need to know a particular field (MyField) exist in the database . This field name can exist in any table/tables in the database . If I use INDBC() , I have to specify the table name along with the field name. I don’t know the table names . That’s my biggest problem.
> How can I do a global check to see whether ‘Myfield’ exist in database ??
>
>Please Help !!
>
>TIA
>
>- Jeana -
lcField = "myfieldname"
OPEN DATA mydata SHARE
SELECT d1.objectname AS table_name, d2.objectname AS field_name ;
FROM DBC() d1 ;
JOIN DBC() d2 ;
ON d1.objectid = d2.parentid ;
WHERE d1.objecttype = "Table" ;
AND d2.objecttype = "Field" ;
AND d2.objectname = lcField ;
INTO CURSOR cutmp
Insanity: Doing the same thing over and over and expecting different results.