• Topic
  • Discussion
  • UdaWikiWeb.DatabaseNotSelectedYet(Last) -- Owiki? , 2016-08-19 14:59:52 Edit owiki 2016-08-19 14:59:52

    Error Messages (D)

    A B C D E F G H I J K L M N O P Q R S T U V W X Y Z #

    Database not selected yet (-349)

    Informix error (-349) occurs when you attempt to execute a SQL statement and there is no current database. This can occur when either of the following happens:

    • No current database has been established yet. This happens when an implicit server connection is made. To make an implicit connection, you pass
      @<server_name> to the database field. To explicitly make a connection, change this to the actual database_name you wish to connect to.
    • The current database was closed with a CLOSE DATABASE statement. You execute the DATABASE or CREATE DATABASE statement to establish a current database.

    Here's an example of what happens when you've made an implicit connection:

    [INF73_MT]
    Host = localhost:5032
    UserName = username
    ServerType = Informix 7.3
    Driver = /dbs6/openlink/32bit/v51/mt/lib/oplodbc.so
    Database = @myserver
    
            
    bash$ ./odbctest "DSN=INF73_MT;PWD=password" 
    OpenLink ODBC Demonstration program This program shows an interactive SQL processor 
    Driver: 05.10.0903 OpenLink Generic ODBC Driver (oplodbc.so) 
    
    SQL>select count(*) from state 
    SQLPrepare = [OpenLink][ODBC][Informix Server]Database not selected yet. (-349), SQLSTATE=S1000 
    
    SQL>database stores7 Statement executed. 
    SQL>select count(*) from state (count(*)) 
    ----------- 
    54 result set 1 returned 1 rows.
        
    

    Evidence

    odbc.ini File
    Request Broker Log
    udbc.ini File


    Referenced by...