Problems using ODBC Driver. Connection never opens.

Hi,
I have a problem with the ODBC driver for oracle.
This is the behaviour: the first attemp of connection doesn't work, the connection never opens. the second attempt is almost instantaneous but 10 minutes later the connection fails again. It is neccesary to close and open the app using the odbc driver again.
I've tried everything.
Thanks in advance,Regards.

Hi,
Quote: "ERROR [IM002] [Microsoft] [ODBC Driver Manager] Data source name not found and no default driver specified".
This error is typically thrown because the code is specifying a DSN that does not exist. So, please make sure you are referencing a DSN that has been created.
You can refer to this article below:
https://community.microfocus.com/borland/test/silk_test/w/knowledge_base/10737.how-do-i-resolve-error-im002-microsoft-odbc-driver-manager-data-source-name-not-found-and-no-default-driver-specified.aspx
Or please add the right conenction string. You can look at following website:
http://www.connectionstrings.com/
Note This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and
has not tested any software or information found on these sites.
Andy Altmann
TechNet Community Support

Similar Messages

  • Problem using odbc driver 10g with SQL Server 2005

    We are getting following error. Any solution?
    cannot retrieve the column codepage info from the OLE DB provider

    there is an additional error message
    The output column SR_CONTACT_POINT_ID (58) has a precision which is not valid. Precision must be between 1 and 38.

  • Problem using JDBC to connect to WBEM ODBC driver

    Hello,
    I've got a problem to connect to WBEM ODBC driver using JDBC. The error is:
    exception due a la requetejava.sql.SQLException: [Microsoft][WBEM ODBC Driver]Unable to connect
    When I try to connect to a MS access database, replacing only the ODBC source name, it's working. I can access to the MS access db. But when I put the WMI ODBC source name, WMI, I've got this error.
    Does anybody know what could happened? Is it possible to access to WMI through JDBC? With MS access, accessing WMI ODBC is working !
    Thanks very much for your help.
    Here is the part of the source code :
    import java.sql.*;
    import java.io.*;
    public class Main_1 {
    /** Creates a new instance of Main_1 */
    public Main_1() {
    * @param args the command line arguments
    public static void main(String[] args) {
    try {
    String url = "jdbc:odbc:WMI";
    Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection con = DriverManager.getConnection(url);     
    String query = "Select * from Win32_Processor";
    //String query = "Select * from test;";
    ResultSet results;
    Statement stmt = con.createStatement();
    results = stmt.executeQuery(query);
    //System.out.println (results);
    catch(Exception e){
         System.out.println("exception due a la requete" + e);
    e.printStackTrace();
    }

    you have to first start the network listener before you can run the program
    start TNSLSNR before running the jdbc program

  • Forms 6i to sql database using odbc driver

    am using orace forms 6i and i want to connect to sql database to use the tables there i can seem to do that with odbc cos it is asking for 'oracle open client adaptor', please can somebody tell me how and where i can get this adaptor driver.

    I suggest posting this in the Forms discussion forum. The open client adapter stuff is a bit different that the ODBC driver.
    Justin

  • Cannot create DSN using ODBC Driver 8.1.5

    I was able to create new DSNs using Oracle ODBC Driver 8.1.5 and linked Access tables. But all of a sudden (yes, without any reason, I was not downloading anything at that time) , I got ODBC-Call Failed. And when I tried to reopen (browse) the linked table, a message saying -
    One of the library files needed to run this application cannot be found.
    Then I realized that I cannot configure existing DSNs using Oracle ODBC Driver 8.1.5. I trid to create a new one. But after I selected the Oracle ODBC Driver, it did not bring me to the screen to set up DSN, and just went back to the same ODBC Datasource Administrator window.
    I tried to use SQL Plus to connect to the Oracle server and it worked. But when I tried the ODBCtest, I got the same message with more details -
    SQLSTATE: IM003, Native Error Code: 160, Driver Message: Specified Driver could ont be loaded due to system error 1114. (Oracle ODBC Driver).
    I tried to follow the 'help' hint but nothing's working. I reinstalled the ODBC driver, and even downloaded the MDAC 2.6 that appeared in one old discussion topic, but still have problems.
    Was it something suddenly crashed? Could someone please help? (p.s. I am using win98). Thanks!

    What version of the mfc42*.dll's do you have in your system directory?
    Justin

  • ORA-12154 Windows 7 32bit ORACLE 11g ODBC Driver CONNECT

    Hi All,
    I'm having problems connecting to extenal database using Oracle ODBC driver for Windows 7 32bit  .
    I have downloaded the instantclient odbc nt 11.2.0.4zip drivers for 32-bit and unpacked it
    and run the installer and choose the default location ie c:\app\product\11.2.0\client_1
    2.I done all the necessary setting ie set the Path and creating new user variable for tns admin
    in the system environment and modified the hostfile on etc sys32 and copied both tsnamesn and sqlnet
    to Network\Admin file
    3.I then started the Data Sources (ODBC) manager, configured the driver and tested the
    configuration then I got a testing connection error SQLstate= 08004... ORA-12154 TNS couldn't connect.
    could you please help. Thanks in advance.

    I couldn't understand why you need two different tnsnames files. Are they resides in two different directories with filename "tnsnames.ora"? In that case, you need to set the TNS_ADMIN appropriately.
    If you haven't named tnsnames files as "tnsnames.ora", then Oracle ODBC driver may not able to access it.
    Also if TNS_ADMIN env variable is not pointed to the correct directory where tnsnames.ora file resides, then Oracle ODBC driver won't be able to access it.
    In any case, if Oracle ODBC driver unable to access the tnsnames.ora and there is no connection string value stored in the Windows registry, then it throws ORA-12154 error.
    Thanks,
    Senthil

  • Using SQLBindParameter, SQLPrepare and SQLExecute to insert a Decimal(5,3) type fails with SQLSTATE: 22003 using ODBC Driver 11 for SQL Server

    Hello everyone.
    I'm using SQL Server 2014, and writting on some C++ app to query and modify the database. I use the ODBC API.
    I'm stuck on inserting an SQL_NUMERIC_STRUCT value into the database, if the corresponding database-column has a scale set.
    For test-purposes: I have a Table named 'decTable' that has a column 'id' (integer) and a column 'dec' (decimal(5,3))
    In the code I basically do:
    1. Connect to the DB, get the handles, etc.
    2. Use SQLBindParameter to bind a SQL_NUMERIC_STRUCT to a query with parameter markers. Note that I do include the information about precision and scale, something like: SQLBindParameter(hstmt, 2, SQL_PARAM_INPUT, SQL_C_NUMERIC, SQL_NUMERIC, 5, 3, &numStr,
    sizeof(cbNum), &cbNum);
    3. Prepare a Statement to insert values, something like: SQLPrepare(hstmt, L"INSERT INTO decTable (id, dec) values(?, ?)", SQL_NTS);
    4. Set some valid data on the SQL_NUMERIC_STRUCT
    5. Call SQLExecute to execute. But now I get the error:
    SQLSTATE: 22003; nativeErr: 0 Msg: [Microsoft][ODBC Driver 11 for SQL Server]Numeric value out of range
    I dont get it what I am doing wrong. The same code works fine against IBM DB2 and MySql. I also have no problems reading a SQL_NUMERIC_STRUCT using SQLBindCol(..) and the various SQLSetDescField to define the scale and precision.
    Is there a problem in the ODBC Driver of the SQL Server 2014?
    For completeness, here is a working c++ example:
    // InsertNumTest.cpp
    // create database using:
    create a table decTable with an id and a decimal(5,3) column:
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE[dbo].[decTable](
    [id][int] NOT NULL,
    [dec][decimal](5, 3) NULL,
    CONSTRAINT[PK_decTable] PRIMARY KEY CLUSTERED
    [id] ASC
    )WITH(PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON[PRIMARY]
    ) ON[PRIMARY]
    GO
    // Then create an odbc DSN entry that can be used:
    #define DSN L"exOdbc_SqlServer_2014"
    #define USER L"exodbc"
    #define PASS L"testexodbc"
    // system
    #include <iostream>
    #include <tchar.h>
    #include <windows.h>
    // odbc-things
    #include <sql.h>
    #include <sqlext.h>
    #include <sqlucode.h>
    void printErrors(SQLSMALLINT handleType, SQLHANDLE h)
        SQLSMALLINT recNr = 1;
        SQLRETURN ret = SQL_SUCCESS;
        SQLSMALLINT cb = 0;
        SQLWCHAR sqlState[5 + 1];
        SQLINTEGER nativeErr;
        SQLWCHAR msg[SQL_MAX_MESSAGE_LENGTH + 1];
        while (ret == SQL_SUCCESS || ret == SQL_SUCCESS_WITH_INFO)
            msg[0] = 0;
            ret = SQLGetDiagRec(handleType, h, recNr, sqlState, &nativeErr, msg, SQL_MAX_MESSAGE_LENGTH + 1, &cb);
            if (ret == SQL_SUCCESS || ret == SQL_SUCCESS_WITH_INFO)
                std::wcout << L"SQLSTATE: " << sqlState << L"; nativeErr: " << nativeErr << L" Msg: " << msg << std::endl;
            ++recNr;
    void printErrorsAndAbort(SQLSMALLINT handleType, SQLHANDLE h)
        printErrors(handleType, h);
        getchar();
        abort();
    int _tmain(int argc, _TCHAR* argv[])
        SQLHENV henv = SQL_NULL_HENV;
        SQLHDBC hdbc = SQL_NULL_HDBC;
        SQLHSTMT hstmt = SQL_NULL_HSTMT;
        SQLHDESC hdesc = SQL_NULL_HDESC;
        SQLRETURN ret = 0;
        // Connect to DB
        ret = SQLAllocHandle(SQL_HANDLE_ENV, NULL, &henv);
        ret = SQLSetEnvAttr(henv, SQL_ATTR_ODBC_VERSION, (SQLPOINTER)SQL_OV_ODBC3, SQL_IS_INTEGER);
        ret = SQLAllocHandle(SQL_HANDLE_DBC, henv, &hdbc);
        ret = SQLConnect(hdbc, (SQLWCHAR*)DSN, SQL_NTS, USER, SQL_NTS, PASS, SQL_NTS);
        if (!SQL_SUCCEEDED(ret))
            printErrors(SQL_HANDLE_DBC, hdbc);
            getchar();
            return -1;
        ret = SQLAllocHandle(SQL_HANDLE_STMT, hdbc, &hstmt);
        // Bind id as parameter
        SQLINTEGER id = 0;
        SQLINTEGER cbId = 0;
        ret = SQLBindParameter(hstmt, 1, SQL_PARAM_INPUT, SQL_C_SLONG, SQL_INTEGER, 0, 0, &id, sizeof(id), &cbId);
        if (!SQL_SUCCEEDED(ret))
            printErrorsAndAbort(SQL_HANDLE_STMT, hstmt);
        // Bind numStr as Insert-parameter
        SQL_NUMERIC_STRUCT numStr;
        ZeroMemory(&numStr, sizeof(numStr));
        SQLINTEGER cbNum = 0;
        ret = SQLBindParameter(hstmt, 2, SQL_PARAM_INPUT, SQL_C_NUMERIC, SQL_NUMERIC, 5, 3, &numStr, sizeof(cbNum), &cbNum);
        if (!SQL_SUCCEEDED(ret))
            printErrorsAndAbort(SQL_HANDLE_STMT, hstmt);
        // Prepare statement
        ret = SQLPrepare(hstmt, L"INSERT INTO decTable (id, dec) values(?, ?)", SQL_NTS);
        if (!SQL_SUCCEEDED(ret))
            printErrorsAndAbort(SQL_HANDLE_STMT, hstmt);
        // Set some data and execute
        id = 1;
        SQLINTEGER iVal = 12345;
        memcpy(numStr.val, &iVal, sizeof(iVal));
        numStr.precision = 5;
        numStr.scale = 3;
        numStr.sign = 1;
        ret = SQLExecute(hstmt);
        if (!SQL_SUCCEEDED(ret))
            printErrorsAndAbort(SQL_HANDLE_STMT, hstmt);
        getchar();
        return 0;

    This post might help:
    http://msdn.developer-works.com/article/12639498/SQL_C_NUMERIC+data+incorrect+after+insert
    If this is no solution try increasing the decimale number on the SQL server table, if you stille have the same problem after that change the column to a nvarchar and see the actual value that is put through the ODBC connector for SQL.

  • Using ODBC driver FOXPRO DBF

    Hello, i am defining a connection using ODBC with foxpro, i am able to see the table but not the column
    Are there parameters to adapt somewhere (SBO,...)

    Hi Bertrand
    Please let me know the following information:
    - Exact version of Crystal Reports Designer. (For this information open Crystal Reports. Go to Help > About Crystal Reports).
    - Exact version of the Business Objects Enterprise.
    - Exact version of the Database.
    - Type and the version of the driver used to connect.
    - Are you able to view all the columns when you create Crystal Report directly using ODBC connection?
    - What happens if you create the Data Connection using OLEDB or Native connection?
    Hope this helps.
    Thanks!

  • Jdbc:odbc driver connection issues

    I need to use the jdbc:odbc driver to access a non-oracle db from a jsp. I am sure my dsn is fine as I can use a non JSP java app to connect to the odbc db. I have loaded the sun.jdbc.odbc classes in the schema I am working in as it is not loaded by default in 9.2.0.7 currently I am on a windows system. I have found the following:
    public static void doTest()throws Exception{
    // load the local Oracle Driver
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    connLocalOracle = new OracleDriver().defaultConnection();
    // load the odbc driver
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    if I exit at this point the jsp does not through an exception
    however if I include the line:
    connODBC = DriverManager.getConnection(odbcURL,"XX","XX");
    I get the error:
    SQL> execute do_jdbc_odbc_test;
    BEGIN do_jdbc_odbc_test; END;
    ERROR at line 1:
    ORA-29532: Java call terminated by uncaught Java exception:
    java.lang.UnsatisfiedLinkError: sun.jdbc.odbc.JdbcOdbc.allocConnect
    ORA-06512: at "TU1.DO_JDBC_ODBC_TEST", line 0
    ORA-06512: at line 1
    So I am assuming I am loading the driver but the driver is not talking to the odbc configuration in windows.
    What permissions would I need to give to the user to allow this connection to occur?
    How can I find out if this is indeed the case?
    If not how can I make this connection happen using ODBC?

    If by jsp you mean Java Stored Procedure, the hybrid JDbc-ODBC stack won't work. You can connect to non-Oracle RDBMS from within Java in the database by using a pure Java JDBC driver of the target RDBM. Fwiw, a complete example connecting to SQl Server from with JavaDB is described in my upcoming book. (See http://db360.blogspot.com/)
    Kuassi

  • Problem using JDBC driver with JSP

    Hi, I am trying to connecto to my mysql server via a JSP page, but it seems that there is a problem with the driver call or something in my configuration that unables me to connect. I have the mysql-connector-java-3.0.7-stable driver.
    This is how my classpath looks like:
    CLASSPATH=/home/hooper/Sources/mysql-connector-java-4.0.7-stable/lib:/home/hooper/Sources/mysql-connector-java-3.0.7-stable/com:/home/hooper/Sources/mysql-connector-java-3.0.7-stable/mysql-connector-java-3.0.7-stable-bin.jar:/usr/java/j2sdk1.4.1_02:.:/usr/java/j2sdk1.4.1_02/lib/tools.jar:/usr/java/j2sdk1.4.1_02
    And this is my JSP page code:
    <%@ page language="java" import= "java.sql.*"%>
    <%
    Connection con = null;
         String userName = "hooper";
         String password = ""; //No password
         String url = "jdbc:mysql://localhost/test";
         //Load the Driver class file
         Class.forName("com.mysql.jdbc.Driver");
         //Make a connection to the MySQL database
         con = DriverManager.getConnection (url, userName, password);
         out.println ("Database connection established");
              if (con != null){
                   //Close the connection
                   con.close();
    %>
    And this is the error I get from Tomcat4.1.18:
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: com.mysql.jdbc.Driver
    root cause
    javax.servlet.ServletException: com.mysql.jdbc.Driver
    I hope someone can help me with this.
    Thanks,
    Luis

    Hi..
    Try using this way
    String userName = "hooper";
    String password = ""; //No password
    String url = "jdbc:mysql://localhost:3306/test";
    Class.forName("org.gjt.mm.mysql.Driver");
    try to download the driver for mysql and add it to your classpath
    Hope this works
    Regd
    Vasi

  • Minimum Install for Using ODBC Driver.

    What is the minimum installation required for using ODBC from a client machine.
    EG I have an application in Access and I want to connect to a table on my oracle server. The user machine, has Access installed, and I don't wnat to install the whole 50 megs(OK I exagerate A little but not much) of NET 8 client just so they can look at a table in Access from Oracle.
    What specific elements are necessary in the install, TCP/IP, Named pipe protocol adapters?, required support files?, SQL*plus 8?
    Say its a version 8.0.4 server for arguments sake and I want the least hassle setting up 50 users who already have office installed with the latest version of MS ODBC32, they have no Oracle software on their machines.
    null

    Unfortunately, you'll need to do at least a minimal Oracle client install. While we probably don't actually rely on everything that gets installed here, we don't test our driver with anything less than a minimal install.
    Justin Cave
    ODBC Development

  • Problem with ODBC driver

    Hi guys
    I'm Tring to enable an Oracle DB (version 10.2.0.3.0) as data Source for the physical Layer of The BIEE version 10.0.3.1.4.
    I already installed Patch 5699495
    I already setted, in the Oracle ODBC DriverConfiguration the follow parameters
    Data source names= casual
    TNS Services Name= ORCL(this is my Chose)
    USER ID = The same user that i use when i wanto to connect in my db
    I received the follow error message when i try to test connection.*++
    " Unable To connect.
    SQLState=IM004
    [Microsoft[]Driver Manager ODBC] Function SQLAllocHandle of Driver on SQL_HANDLE_ENV not successfully"
    Thanks in advance
    Best regards

    Why are you using ODBC? Oracle native drivers, OCI, are much faster when using Oracle DBs.

  • Oracle ODBC Driver Connect window appears frequently

    prashant wrote:
    hi
    I am running an application wriiten in vc++.I have installed the
    application at the remote client end
    succesfully.Initaily set the DSN for Oracle (10g exe) .When I start
    using application I get "oracle ODBC Driver Window" after regular
    intervals.
    why this window is appearing frequently when i set the DSN initally and
    tested succesfully.
    pls help!!!

    Oracle doesn't produce such a beast. Microsoft provides a lot of important ODBC infrastructure on Windows that driver writers rely on which isn't available on Linux.
    There are third parties that have developed ODBC drivers for Oracle on Linux. There's an open source project at <http://www.unixodbc.com> that you might be able to use. Companies like Merant may also provide drivers.
    Justin

  • ORA 2005 error when you using ODBC driver of 10.2.0.3

    I am getting following error when connecting Oracle 10.2.0.3 to Oracle 11.1 database from a thrid part application:
    Issue Description. An application using Oracle ODBC driver version 10.2.0.3 to communicate with the Oracle database 11g tries to update the field “SOURCE_CODE” of LONG data type in table “SUBROUTINE” returns the following error.
    ORA-02005: Implict -1 length not valid for the bind or dfeine datatype.
    I updated my client to 10.2.0.4,, error is still present. Does any one know what patch to install to get rid of this error. I cannot modify the third party code.

    What are the system requirements (supported config) of 3rd party app?
    According to the 9.2 Error Messages document,
    >
    ORA-02005 implicit (-1) length not valid for this bind or define datatype
    Cause: A negative length for the define variable was passed to a define function.
    Action: An explicit, non-negative, length parameter must be passed.
    >
    Perhaps you should report this back to vendor as a bug.
    You could also turn on odbc tracing (driver/dsn config) to catch the cuplrit statement.

  • Problem with ODBC Driver 8.1.7.7

    When we try to execute the following sql command, an error message is displayed.
    update tr_werk_tab set (name1,name2) = (select name1, name2 from tr_werk_tab)
    The table in the "select" clause is originally another table. The statement only works with "one" field referenced.
    The error message is:
    ORA-00923 FROM keyword not found where expected.
    This was not a Problem with all the other ODBC Driver versions (7.3, 8.0.5, 8.1.5, 8.1.6).
    What can we do ? The statement works with sql-plus.
    Regards
    Dieter Burger
    TRIAS Informatik GmbH

    First, it appears that you've found the bug. I've confirmed it on my box. I would suggest that you log a TAR with Oracle support so that someone can start looking into the problem. I suspect that some of the SQL munging the driver has to do is mangling your query, but I'd need to do a trace at the TNS level or on the database to see exactly what's being passed over the wire.
    There are previous versions of the 8.1.7.x ODBC driver available for download on OTN. Since it worked correctly in previous versions of the driver, perhaps one of these earlier 8.1.7.x drivers happens not to have this particular bug.
    It appears that you could re-write the query, i.e.
    update emp set empno = (select 1 from dual), ename = (select 'Justin' from dual);
    though that's going to be almost twice as expensive as the proper form.
    Justin

Maybe you are looking for

  • How do I move my iPhone to a new iTunes installation?

    Hi folks, I have a new Windows 7 computer and want to sync my iPhone with it, but iTunes says it's going to delete all of my data. My old computer that I used to sync with is gone; the drive has been reformatted. I don't care about the music on the p

  • How do you 'Frame a website'? In GL cs2

    hi, are there any templates you know of that are GoLiveCS2 compatible that would allow you to embed another website within a frame? eg I have several websites that are existing. I want to create a "frame" where one can click on a tab which would open

  • Inserting a new view  in place of already existed once

    Hai folks, In Ic Webclient on crm 5.0 system i got an issue In <b>identify customer</b> View set i have removed the view of <b>regestered product</b> and want to insert a  view <b>bupaLongTexts</b> there(in that deleted area) I am able to remove the

  • Music app and the mother of all oversights in my opinion...

    (iPhone 4S 32GB iOS 5.1) I've highlighted the questions as i've ranted on... This is an odd one regarding the music app. I've been using itunes match now for a little while. Album artwork is still buggy; it appears that the artwork is re-downloading

  • Load data into Table

    I want to load certain columns from table1 into columns in another table (table2) which is similar to table1 but have some additional columns. I am aware of PL/SQL solution to doing this. But i need to do this using sql statement that is driven from