Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Find if user can Truncate?
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2008
Divers
Thread ID:
01561130
Message ID:
01561139
Vues:
44
>>>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?
>>
>>
>>lnTResult = SQLEXEC(lnYourConnectionHandle,'TRUNCATE TABLE ' + lcYourTableName,'curYourOutPut',aCountInfo)
>>
>>IF lnTResult = 1
>> * Truncate worked *
>>Else
>> * Truncate failed *
>>EndIf
>
>Thank you. Just to clarify for myself. If returned is not 1, is there any other condition (besides user permission) that would cause that?

If the truncate command failed for ANY reason then the returned value is not 1.
ICQ 10556 (ya), 254117
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform