home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.databases.ms-sqlserver      Notorious Rube Goldberg contraption      19,505 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 19,403 of 19,505   
   Anton Shepelev to All   
   Re: `sqlcmd' withholding error messages?   
   22 Aug 22 17:46:22   
   
   From: anton.txt@g{oogle}mail.com   
      
   I wrote:   
      
   > Luuk:   
   >   
   > > -r[0 | 1]   
   > > Redirects the error message output to the screen   
   > > (stderr). If you do not specify a parameter or if you   
   > > specify 0, only error messages that have a severity   
   > > level of 11 or higher are redirected. If you specify 1,   
   > > all error message output including PRINT is redirected.   
   > > Has no effect if you use -o. By default, messages are   
   > > sent to stdout.   
   >   
   > Yes. I inovke `sqlcmd' not only with -r 0, but also with   
   > -b:   
   >   
   >    -b   
   >    Specifies that sqlcmd exits and returns a DOS ERRORLEVEL   
   >    value when an error occurs. The value that is returned to   
   >    the DOS ERRORLEVEL variable is 1 when the SQL Server error   
   >    message has a severity level greater than 10   
   >   
   > The invocation sqlcmd -r 0 -b should either succeed or   
   > print an error message in stderr. In my case, however, it   
   > failed but did not send anything to stderr.   
      
   To clarify -- my purpose is to cause `sqlcmd' to terminate   
   with non-zero error code and to send the output to STDERR in   
   on errors of severity 11 or highter, and to continue   
   exeuction and send output to STDOUT otherwise.  I believe my   
   invocation is should achieve that end, does it not?   
      
   --   
   ()  ascii ribbon campaign - against html e-mail   
   /\  http://preview.tinyurl.com/qcy6mjc [archived]   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca