[unixODBC-support] How to return an error code to the shell from isql

Coughlin, Errick R errick.coughlin at kroger.com
Mon Oct 7 19:55:14 BST 2013


How do you exit with an error code?  The only way I've been able exit out of isql is with "quit" Quit 1 doesn't return 1 to the shell.

Errick Coughlin
Developer - ETL Group
Kroger IS&S Technology Enablement
BTC Grooms ES-283
Office: (513) 387-7576
Mobile: (513) 582-2973

From: unixodbc-support-bounces at mailman.unixodbc.org [mailto:unixodbc-support-bounces at mailman.unixodbc.org] On Behalf Of Nick Gorham
Sent: Monday, October 07, 2013 2:38 PM
To: Support for the unixODBC project
Subject: Re: [unixODBC-support] How to return an error code to the shell from isql

On 07/10/13 19:07, Coughlin, Errick R wrote:
How can I get ISQL connecting to SQL Server to return a non 0 error code to the shell?
Thanks,

Errick

________________________________

This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain information that is confidential and protected by law from unauthorized disclosure. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.




_______________________________________________

unixODBC-support mailing list

unixODBC-support at mailman.unixodbc.org<mailto:unixODBC-support at mailman.unixodbc.org>

http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support
Him

I would alter the code to exit on error. At the moment it just reports a error to the ouput and continues. Though you may be better looking at something like perl if you want to dome mor ethan simple testing with isql.

--
Nick

________________________________

This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain information that is confidential and protected by law from unauthorized disclosure. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.unixodbc.org/pipermail/unixodbc-support/attachments/20131007/cb4c4e49/attachment.html>


More information about the unixODBC-support mailing list