>Hi, > >Is it possible to determine (from a VFP application) if a user has SQL Server permission to Truncate a table? TIA. > >UPDATE: Or at least how to determine from the error number returned when executing Truncate table command that the problem was due to the user permission to Truncate?
ifexists (select1from fn_my_permissions('MyTableName', 'object') where PERMISSION_NAME = 'ALTER')
print'Can truncate table'ELSEprint'Do not have permissions to truncate table'