Menu

SQLDriverConnect = (2704) SQLSTATE=

Help
2008-01-31
2013-05-08
  • Theo Kselman

    Theo Kselman - 2008-01-31

    Hi,

    When trying to establish a connection with a Datadirect ODBC driver, I get an error on connection :

    $ ./iodbctest
    iODBC Demonstration program
    This program shows an interactive SQL processor
    Driver Manager: 03.52.0607.1008
    Enter ODBC connect string (? shows list): ?
    DSN                              | Driver
    ------------------------------------------------------------------------------
    OraWP                            | DataDirect 5.3 Oracle Wire Protocol
    Enter ODBC connect string (? shows list): DSN=OraWP;UID=scott;PWD=tiger
    1: SQLDriverConnect =  (2704) SQLSTATE=
    1: ODBC_Connect =  (2704) SQLSTATE=

    My DataSource config :

    [OraWP3]
    Driver=/opt/odbc32v53/lib/ivora23.so
    HostName=<My Server IP>
    PortNumber=1521
    SID=ora10r2

    a trace looks like :

    [000033.072539]
    iodbctest       00000000 ENTER SQLDriverConnect
                    SQLHDBC           0x8e0fb78
                    SQLPOINTER        0x0
                    SQLCHAR         * 0xbfff9c00
                                      | DSN=OraWP;UID=scott;PWD=*****            |
                    SQLSMALLINT       -3 (SQL_NTS)
                    SQLCHAR         * 0x80827a0
                    SQLSMALLINT       4096
                    SQLSMALLINT     * 0xbfff97ca
                    SQLUSMALLINT      1 (SQL_DRIVER_COMPLETE)

    [000033.081839]
    iodbctest       B75E7AC0 EXIT  SQLDriverConnect with return code -1 (SQL_ERROR)
                    SQLHDBC           0x8e0fb78
                    SQLPOINTER        0x0
                    SQLCHAR         * 0xbfff9c00
                    SQLSMALLINT       -3 (SQL_NTS)
                    SQLCHAR         * 0x80827a0
                    SQLSMALLINT       4096
                    SQLSMALLINT     * 0xbfff97ca
                    SQLUSMALLINT      1 (SQL_DRIVER_COMPLETE)
                   

    If I try the driver with a different Driver manager (UnixODBC, DataDirect) this connection string works fine.
    When using another driver with iODBC I am also able to connect.

    I looked up error 2704 :

    -2704: Dialog failed
    ODBC Error. During the call of SQLDriverConnect() the driver attempted to display its login dialog and failed.

    Why would the driver attempt to display a login dialog? the connection string provided contains enough information to connect.
    What can I do to resolve this issue?

    Thanks,

    Theo

     
    • iODBC Maintainer

      Please change your SQLDriverConnect function to use SQL_DRIVER_NOPROMPT instead of SQL_DRIVER_COMPLETE.

       

Log in to post a comment.