Hello again, Can anybody tell me what the return values of system function xp_write_file() are (in SA12)? Documentation only says that "It returns 0 if successful, and non-zero if it fails." So what are those non-zero values and their meanings?
Request clarification before answering.
I don't believe the lack of documentation is intentional. Here's a short summary:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The only non-zero values that are returned from the xp_write_file() function are the values -1 and +1. The value "1" indicates that the write failed. (Sorry, no additional information at this time is available).
Just in case the return value ever changes in the future I would suggest that you write your code as:
declare @rv int; set @rv = xp_write_file( ... ); if @rv != 0 then -- handle error condition else -- write succeeded. end if;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.