I'm trying to get the current user's group name from sysusers with a query like this:
SELECT G.name as Fun FROM dbo.sysusers G INNER JOIN dbo.sysusers U ON G.uid = U.gid WHERE (U.name = USER_NAME())
From the Enterprise Manager it works OK. From an application (C++ Builder) I use a query object, set the query, open it, and when I try to read the data I get "Field 'Fun' not found". I tried different ways but no success. Is there some way to get this data from an application???
Thanks
SELECT G.name as Fun FROM dbo.sysusers G INNER JOIN dbo.sysusers U ON G.uid = U.gid WHERE (U.name = USER_NAME())
From the Enterprise Manager it works OK. From an application (C++ Builder) I use a query object, set the query, open it, and when I try to read the data I get "Field 'Fun' not found". I tried different ways but no success. Is there some way to get this data from an application???
Thanks