none
ADODB.Connection.Open() fails for oracle18c onwards RRS feed

  • Question

  • Hi Team,

    I am working on a project since last 7 years. Our desktop application supports Oracle DB as well.

    To connect to Oracle DB we are using Microsoft oledb provider for oracle. It is working well till i connect to Oracle 12c.

    Now when we use Oracle 18C or later version then my application crashes while opening the connection.

    Please see the code snippet below :

    Dim dtb As ADODB.Connection Dim conn As String conn = "Provider=MSDAORA;" & "Data Source=INRT" & ";Password=abc@908" & ";User ID=system" dtb.open(conn, "system", "abc@908", ADODB.ConnectOptionEnum.adAsyncConnect)

    Here it is throwing an error "Attempted to read or write protected memory. This is often an indication that other memory is corrupt." and crashes.

    Note : Using Oracle 19c client(32bit) i am able to setup the connection using above details.

    Please help me to resolve the problem.

    Thanks


    Nihal.k


    • Edited by Nihal_dev Wednesday, August 28, 2019 10:41 AM
    Wednesday, August 28, 2019 10:39 AM

Answers

  • Normally one makes connection strings externally configurable. However, if you've hard-coded the provider in the application, you'll need to change the code.

    Not only is MSDAORA deprecated, it is not included in newer Windows versions.  It uses the ancient Oracle version 7 CLI, which is no longer supported by Oracle. Note that deprecated and not supported doesn't mean it won't work (or can't be made to work with hacks) but you are own to do so. I suggest you change the code to specify the Oracle-supplied provider. Typically, no other code changes will be needed.


    Dan Guzman, Data Platform MVP, http://www.dbdelta.com

    • Marked as answer by Nihal_dev Wednesday, September 4, 2019 7:10 AM
    Wednesday, August 28, 2019 11:33 AM

All replies

  • The MSDAORA OLE DB provider has long been deprecated and should not be used. Instead, use the OLE DB provider provided by the Oracle DBMS vendor.


    Dan Guzman, Data Platform MVP, http://www.dbdelta.com

    Wednesday, August 28, 2019 10:49 AM
  • In order to use another provider,  I need to change the my code.

    The issue i am facing here is happening just because of MSDAORA OLE DB is deprecated ??

     

     

    Nihal.k


    • Edited by Nihal_dev Wednesday, August 28, 2019 11:01 AM
    Wednesday, August 28, 2019 11:01 AM
  • Normally one makes connection strings externally configurable. However, if you've hard-coded the provider in the application, you'll need to change the code.

    Not only is MSDAORA deprecated, it is not included in newer Windows versions.  It uses the ancient Oracle version 7 CLI, which is no longer supported by Oracle. Note that deprecated and not supported doesn't mean it won't work (or can't be made to work with hacks) but you are own to do so. I suggest you change the code to specify the Oracle-supplied provider. Typically, no other code changes will be needed.


    Dan Guzman, Data Platform MVP, http://www.dbdelta.com

    • Marked as answer by Nihal_dev Wednesday, September 4, 2019 7:10 AM
    Wednesday, August 28, 2019 11:33 AM