Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Find if user can Truncate?
Message
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 2008
Miscellaneous
Thread ID:
01561130
Message ID:
01561138
Views:
50
>>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?
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform