[unixODBC-support] isql: unable to create temp tables

Gorman, Greg Greg.Gorman at mercer.com
Wed Jan 11 16:51:51 GMT 2012


Hi Nick,

Thanks for the reply. I tried that, but isql just dumps me out, when I try to use the -e switch, as below:

/home/ggorman> isql -e DB34 ggorman mypwd

**********************************************
* unixODBC - isql                            *
**********************************************
* Syntax                                     *
*                                            *
*      isql DSN [UID [PWD]] [options]        *
*                                            *
* Options                                    *
*                                            *
* -b         batch.(no prompting etc)        *
* -dx        delimit columns with x          *
* -x0xXX     delimit columns with XX, where  *
*            x is in hex, ie 0x09 is tab     *
* -w         wrap results in an HTML table   *
* -c         column names on first row.      *
*            (only used when -d)             *
* -mn        limit column display width to n *
* -v         verbose.                        *
* -lx        set locale to x                 *
* -q         wrap char fields in dquotes     *
* -3         Use ODBC 3 calls                *
* -n         Use new line processing         *
* -e         Use SQLExecDirect not Prepare   *
* --version  version                         *
*                                            *
* Commands                                   *
*                                            *
* help - list tables                         *
* help table - list columns in table         *
* help help - list all help options          *
*                                            *
* Examples                                   *
*                                            *
*      isql WebDB MyID MyPWD -w < My.sql     *
*                                            *
*      Each line in My.sql must contain      *
*      exactly 1 SQL command except for the  *
*      last line which must be blank (unless *
*      -n option specified).                 *
*                                            *
* Please visit;                              *
*                                            *
*      http://www.unixodbc.org               *
*      pharvey at codebydesign.com              *
*      nick at easysoft.com                     *
**********************************************

Greg

-----Original Message-----
From: unixodbc-support-bounces at mailman.unixodbc.org [mailto:unixodbc-support-bounces at mailman.unixodbc.org] On Behalf Of Nick Gorham
Sent: Wednesday, January 11, 2012 11:45 AM
To: Support for the unixODBC project
Subject: Re: [unixODBC-support] isql: unable to create temp tables

On 11/01/12 16:26, Gorman, Greg wrote:
> Hello all,
>
> I am using isql version 2.3.0, under Red Hat Enterprise Linux Server release 5.3 (Tikanga), to connect to a MS SQL Server db.
>
> I can successfully connect to the database using my username and password.
> I can successfully run select statements just fine.
> I *cannot create a temp table*, though, even though my user id has permission to do so.
>
> For comparison, I *can*, using the same credentials, create a temp table using each of the following:
>          the sqlcmd utility,
>          the tsql utility, and
>          the SQL Server Management Studio (from Windows).
>
> Any guidance or help would be appreciated. Thank you in advance.

Its probbaly because isql uses SQLPrepare and SQLExecute, there are effects of this with SQL Server. Try

isql -e dsn user pass

To use SQLExecDirect instead and see if that makes any difference,

--
Nick
_______________________________________________
unixODBC-support mailing list
unixODBC-support at mailman.unixodbc.org
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support

This e-mail and any attachments may be confidential, proprietary or legally privileged. Any review, use, disclosure, distribution or copying of this e-mail is prohibited except by or on behalf of the intended recipient. If you received this message in error or are not the intended recipient, please delete or destroy the e-mail message and any attachments or copies and notify the sender of the erroneous delivery by return e-mail. To the extent that this message or its attachments were sent without encryption, we can not guarantee that the contents have not been changed or tampered with. Any advice expressed in this message is being delivered to you solely for your use in connection with the matters addressed herein and may not be used for any other purpose without our prior written consent.

The information contained in this document (including any attachments) is not intended by Mercer to be used, and it cannot be used, for the purpose of avoiding penalties under the Internal Revenue Code that may be imposed on the taxpayer.


More information about the unixODBC-support mailing list