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,477 of 19,505    |
|    Anton Shepelev to All    |
|    Re: `sqlcmd' defective by design?    |
|    13 May 24 17:32:01    |
   
   From: anton.txt@g{oogle}mail.com   
      
   I wrote:   
      
   > I have a nasty problem in my automation batch scripts that   
   > invoke `sqlcmd`: whatever I try, I cannot cause it to   
   > terminate with an error level in case of a timeout.   
      
   The only solution I have found is to detect the words   
   "Timeout expired" in the standard output. Here is a sample   
   batch script:   
      
    @ECHO OFF   
    SET OUT=out.txt   
    SET ERR=err.txt   
      
    sqlcmd -S
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca