[unixODBC-support] How does 'isql -n' work?

Jeff Martin JMartin at telecomsys.com
Tue Jun 30 16:23:09 BST 2009


I'm using unixODBC 2.2.14.   I recently noticed that isql now supports a
-n switch for "Use new line processing".  Running with -n, the startup
message implies that I can now have multi-line SQL terminated with a
semi-colon.  However, when I run with -n, isql will not execute the SQL
that is terminated by a semi-colon.  It's as if isql is ignoring my
semi-colon and continues to build up the statement.  From the startup
message with -n, I also see a 'go' command, but that does not seem to do
anything either.

For example:

% isql -n some_dsn 
+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement(s)[;]                   |
| go                                    |
| \noac                                 |
| \ac                                   |
| \commit                               |
| \rollback                             |
| \tables                               |
| \columns <table-name>                 |
| \quit                                 |
|                                       |
+---------------------------------------+
1 SQL> select * from users;
2 SQL> ;
3 SQL> select *  
4 SQL> from users;
5 SQL> go;
6 SQL> quit
7 SQL> \quit
%


I took a look at the isql.c source code in CVS, but can't figure out
what I'm supposed to do when using the -n switch to actually get the SQL
statement execute



Thanks,
-- Jeff



CONFIDENTIALITY NOTICE: The information contained in this message may be privileged and/or confidential. If you are not the intended recipient, or responsible for delivering this message to the intended recipient, any review, forwarding, dissemination, distribution or copying of this communication or any attachment(s) is strictly prohibited. If you have received this message in error, please notify the sender immediately, and delete it and all attachments from your computer and network.


More information about the unixODBC-support mailing list