Connect to APEX database using VBA+ADO code in Microsoft Excel & Word?

I am looking at APEX as a potential replacement for a growing reporting/analysis system. As yet I have not found a clear answer on an important question.
The current system is a shared database and a collection of Microsoft Excel and Word templates. Each template contains underlying VBA code that establishes a direct connection to the database via OLE DB (i.e. ADODB objects in VBA via the OLE DB Provider for JET).
Each template’s underlying VBA code executes stored procedures or queries as required, the results of which are returned as Recordset objects and rendered to the Excel worksheet or Word document. Similarly, in some cases, data entered into an Excel worksheet by a user can be submitted back to the database at the click of a button, again via Recordset objects.
Now most of our templates could easily be ported to APEX. However, there is a strong preference that some of our templates continue to exist and maintain current functionality. So we have a requirement that Excel and Word can seamlessly and directly interact with an APEX database.
Long question short – is there a way to establish a connection and retrieve/insert data from an APEX database using OLE DB (ADODB) in VBA, as described above? I understand that APEX sits ‘on top’ of a real Oracle database, and I know Oracle provides an OLE DB Provider (OraOLEDB) for Oracle databases. Would OraOLEDB do the trick, or is it not as simple as that?
Many thanks for your insights on this,
Michal

The current system is a shared database and a collection of Microsoft Excel and Word templates. Each template contains underlying VBA code that establishes a direct connection to the database via OLE DB (i.e. ADODB objects in VBA via the OLE DB Provider for JET).
Long question short – is there a way to establish a connection and retrieve/insert data from an APEX database using OLE DB (ADODB) in VBA, as described above? I understand that APEX sits ‘on top’ of a real Oracle database, and I know Oracle provides an OLE DB Provider (OraOLEDB) for Oracle databases. Would OraOLEDB do the trick, or is it not as simple as that?Hi,
Apex gets installed as a separate schema in an existing database.
So it will not in any way interfere with your existing setup. You can continue to connect directly to the database from your spreadsheets, call stored procedures from VBA/ADO, etc.
- Morten
http://ora-00001.blogspot.com

Similar Messages

  • Unable to connect to Oracle Database using Oracle Sql developer 2.1.1.64

    Hi Everyone,
    I am searching for some help regarding my problem with Oracle connectivity. I have installed Oracle 11g release 2 on my Windows XP Professional Laptop. For a few days after installation i could connect to the Oracle database with the SYSTEM account using Oracle SQL developer ( installed on the same Laptop) but now i am unable to do so.It gives me this annoying message:
    An error was encountered performing the required operation  Got a minus one from read call .Vendor code 0
    However i am able to connect using Sql Plus by supplying the username SYSTEM and the corresponding password.
    My TNSNAMES .ora file is as follows:
    ORACLE =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST =localhost)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = ORACLE)
    ORACLR_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    (CONNECT_DATA =
    (SID = CLRExtProc)
    (PRESENTATION = RO)
    My Listener.ora file is as follows:
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = CLRExtProc)
    (ORACLE_HOME = D:\app\product\11.2.0\dbhome_1)
    (PROGRAM = extproc)
    (ENVS = "EXTPROC_DLLS=ONLY:D:\app\product\11.2.0\dbhome_1\bin\oraclr11.dll")
    (SID_DESC =
    (GLOBAL_DBNAME = Oracle)
    (ORACLE_HOME = D:\app\product\11.2.0\dbhome_1)
    (SID_NAME = Oracle)
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (PROTOCOL_STACK =
    (PRESENTATION = GIOP)
    (SESSION = RAW)
    ADR_BASE_LISTENER = D:\app
    My Sqlnet.ora file is as follows:
    SQLNET.AUTHENTICATION_SERVICES= (NTS)
    NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
    I am new to Oracle and so i need someone in this forum who can help me resolve this problem. Also i even tried connecting to the database using Toad 10.5.0.41. It give me the following error:
    ORA 12537 : TNS Connection closed
    Thanks for your patience and help in advance.
    ---Prashant

    Hello Irian and Sue,
    I can connect to the Oracle database using SQL Plus. Now when i TNSPING ORACLE from command line i get the following message :
    Used parameter files:
    D:\app\product\11.2.0\dbhome_1\network\admin\sqlnet.ora
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST =localhost
    *)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = ORACLE)))*
    TNS-12537: TNS:connection closed
    Thanks for your response to my initial post.Do u have any other methods to resolve this?

  • How can I connect to the database using ODBC within excel.

    Hi,
    How can I connect to the database using ODBC within excel and just refresh the data when needed.
    Thanks,
    Priyanka
    Edited by: user554934 on Jun 9, 2009 2:53 AM

    This is NOT an APEX relevant question, try posting it in the SQL/PL/SQL Forum..
    Thank you,
    Tony Miller
    Webster, TX

  • Connection to multiple databases using a single EJB

    How can I connect to multiple Databases (using @PersistenceContext) using an EJB?
    Did I need to connect various Entity Managers corresponding to the each database and simply send my Queries?
    I am using Glassfish Application Server
    Netbeans IDE
    Java Derby Database
    Oracle Database
    Java Persistence API
    Thanks in Advance

    Yes, you need a persistence context and thus entity manager per database. Depending on what you want to achieve you may also need to go to the next level in your skill set and learn all about distributed transactions.

  • Connect to oracle database using c program

    I am using AIX environment and i want to connect to oracle database using c program.

    http://download.oracle.com/docs/cd/E11882_01/appdev.112/e10825/pc_03dbc.htm#i5880

  • How to connect to 9i database using 8i sqlplus?

    Hello,
    My Oracle server is running 9.2.0.1
    My Oracle client processes run on the same machine using Oracle 8i (ORACLE_HOME is set to 8i home).
    I cannot connect to 9i database using 8i sqlplus.
    My ORACLE_HOME for client environment is set to 8i home.
    How can I access 9i database using 8i sqlplus?
    Thanks in advance!

    I saw this answered in another thread:
    8i sqlplus not working on 9i
    Please try not to cross post.
    Alison

  • How to connect to oracle10g Database using oracle11g Enterprise Manager.

    Hi,
    please suggest me how to connect to oracle10g Database using oracle11g Enterprise Manager.
    i did setting in tnsnames.ora file of oracle11g database but when i am trying to connect sys@testvsr and password
    using oracle11g Enterprise manager its not connecting but from command prompt its connecting.
    its not acccepting hostname its simply telling invalid username and password ,if i remove and try to connect its connecting.
    so please suggest its very urgent my manager is nagging.
    Regards,
    Srinu.

    you cant attach a database 10g instance with
    Enterprise manager of 11g as enterprise manager is
    meant for a single database only .. your problem cant be solved
    enterprise manager it can be solved by using GRID CONTROL
    For more details visit oracle documentation..
    Hope This helps..
    BI TC

  • I've recently downloaded Lion and find my Microsoft excel, word, entourage and powerpoint do not function. It says these functions are not now supported. Why and how do I get to use them again?

    I've recently downloaded Lion and find my Microsoft excel, word, entourage and powerpoint do not function. It says these functions are not now supported. Why and how do I get to use them again?

    philippnoe wrote:
    What a "great" Program which is supporting many nice but not mandatory things but is not supporting a Program which is used day by day from many users ... and especially this Program is also sold officially by apple !!!
    Yeah!, Why, Lion won't even run my old DOS programs! 

  • Connect applet to database using JDBC

    I try to connect Applet to database, but have error:
    Access denied (Java.lang.Runtime.Permission access Class In paclage.sun.jdbc.odbc)
    I think the reason is the security issue, but how to implement the security issue in the code?
    Help me...

    If you aren't using the plugin, changing the policy file for the Java Runtime Environment (JRE) won't do anything. Changing the policy file and signing the applet are two ways of granting an applet permission. I only use changing the policy file for testing purposes. I broke down and bought a certificate after I realized I would have to change the policy file on hundreds of machines, and do it again if the server changed.
    You sound like you should be using the plugin. Appletviewer knows about the JRE and uses it. You need to change your HTML to use EMBED and OBJECT tags instead of APPLET tags (use HTMLConverter).
    sun.jdbc.obdc.JdbcOdbcDriver is in rt.jar, which is in /Prog Files/Javasoft/JRE/1.3???/lib and is installed when the pluggin is installed (which happens automagically when using the EMBED and OBJECT tags). It was also loaded on your development machine when you installed the SDK.
    You can remove the need to sign the applet to test whether this is a security problem or machine configuration problem. If you copy the .html and .class files to a directory on a machine you expect it to run on, start your browser and type 'C:\MyDirectory\MyApplet.html' in the address bar. Applets loaded locally are granted all permissions.

  • Connecting to MSAcess database using JDBC in JSP

    Hi,
    I have created an Aceess database file (C:\db1.mdb) and created a DSN=db1.
    I could able to connect to the database and retrieve the information from the tables using Sun's JDBC OdBc bridge drivers.
    DriverManager.getConnection("jdbc:odbc:db1").
    It was working Fine in my Standalone java program.
    But,when I used the database connection statements in my JSP page,it is not displaying any error message and not selecting rows from the Select statement i used in my JSP page.(The same worked in my standalone Java program).
    I executed the two programs on same machine.Database is also on the same machine.
    Can anyone tell me what shall i do to connect to the database(C:\db1.mdb) through JSP.
    Thanks in Advance
    Rao...

    in your code do you have any things that is suppressing your exception?? i.e. something lik
    try
    // do your stuff
    catch(Exception e)
    // do nothing??
    }if so you vont get to know of any problem that happened....
    also if there is an un handled exception the jsp page will sometimes come up as blank, because your print streem will be terminated abrubtly....
    this will probably happen if you dont have a try - catch block at all, or if you are not handling the exception that is being thrown.... try inclosing your code in a try catch block and doing ex.priintStackTrace() in the catch block to get the exception trace on the server console....
    also can you post some code for both your java client and jsp??

  • Connecting JDBC-ORACEL database using type 3 thin driver.

    I'm new in Java. Could someone please send me the source code how to connect to remote oracle database with jdbc using Type 3 driver. I'm sure millions of people have already done this. I will appreciate if anyone could help me.

    Have you written any Java or done JDBC before? I don't mean to insult you if you have, but look in any JDBC book or the Java Tutorial and you'll see how to connect to a database:
    Class.forName("fullyResolvedJdbcDriverClassName");
    Connection connection = DriverManager.getConnection("databaseURL");
    Gotta put the JDBC driver class in your CLASSPATH somewhere.
    Gotta follow the directions for your database URL to the letter.
    But if you do all that, it should work.
    Oracle and Type 3 won't change any of this. Personally, I connect to Oracle using the Type 4 thin driver. Why are you using Type 3?
    Did you look at the JDBC tutorial on-line? Sun has great materials there. Have you checked any of that out? - MOD

  • Connecting to SQL database using IP address

    Hi
    I'm writing some SQL code to connect to a database on another site.
    I have been given -
    Server IP addres
    Database name
    User ID
    Using the database connectivity tools it seems like I have to use a dsn to connect to the database - is it possible to do it using the IP and database details above?
    Cheers
    Dave

    Yes you should have all the information needed. To create your DSN you use the Data Sources (ODBC) program in Administrative Tools. If you need help, here are a couple sites that I found with instructions for creating a DSN and again here. Given that you are accessing SQL Server, you may already have the client drivers you need depending upon the version of Windows you are running.
    If you have XP, you're golden. If you are running something earlier, you need to download and install MDAC Version 8.2 SP1.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Connecting to Oracle database using c# project

    I m new to oracle database, Right now I am using oracle 10g XE,some how I have created all the tables procedures etc I am able to connect to the same using sqlplus/server explored/XE
    but while connecting via c# code I am getting invalid username/password error
    my connection string is
    <add key="ServerDB" value="Provider=MSDAORA;Data Source=localhost;uid=xyz;pwd=xyz"/>
    please help me in this
    I m not sure whether the provider name I m using is correct or not. please help

    For the Microsoft OleDb Provider for Oracle the connection string should look like the following:
    Provider=msdaora;Data Source=MyOracleDB;User Id=myUsername;Password=myPassword
    Note that it's User ID and not UID. You can find more examples below, depending upon which driver/provider that you are using:
    http://www.connectionstrings.com/oracle/
    Paul ~~~~ Microsoft MVP (Visual Basic)

  • Connect to remote database using ODBC

    I am new to TimesTen and I would like some help connecting to remote timesten database using ODBC.
    I followed all the instructions in the manual to setup (like logical server and all). but, when I try to connect using "connect dsn=myRemoteDSN" command, it does not work. It gives me this error: 7001: User authentication failed
    It is asking me for username and password but I dont know how to setup username and password. Looked all over the internet and I could not find any relevant posts. I have already tried "unchecking" the authentication, but it still asks me for username and password.

    thanks for your help. I did not realize that that I turned on ACL. creating a user and then granting the needed permissions did the trick.
    I now have another problem. I use windows platform and .NET 2.0 (C#) to connect to remote timesten database. The driver provided by timesten (as part of installation) does not seem to support ADO.NET. I get "driver does not support this function" exception when I try to insert data into a table. Ironically, it does insert the data successfully, but still generates the exception. I looked at various forums.. everyone seems to have the same problem, but have not had any solution yet?
    Could you let me know if you encountered this issue before and how you might have resolved it?
    Many thanks
    Murthy

  • Connecting to Remote Database using Debian w/Oracle XE

    Hello.
    I have managed to install Oracle XE on a Debian box.
    I am trying to connect to a remote server located on my network.
    I am using the following connection string:
    # sqlplus <User>/<Password>@'(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=<IP>)(PORT=1521)))(CONNECT_DATA=(SID=<SID>)))'
    However, I was given both a SID and a Service_name.
    I tried connecting with both.
    Is it possible to parametrize both? I checked and the remote server is up, and that is the existing port.
    Thanks a lot!

    user603592 wrote:
    Hello.
    I have managed to install Oracle XE on a Debian box.
    I am trying to connect to a remote server located on my network.
    I am using the following connection string:
    # sqlplus <User>/<Password>@'(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=<IP>)(PORT=1521)))(CONNECT_DATA=(SID=<SID>)))'
    However, I was given both a SID and a Service_name.
    I tried connecting with both.
    Is it possible to parametrize both? yes, see below
    bcm@bcm-laptop:~$ sqlplus -h
    SQL*Plus: Release 11.2.0.1.0 Production
    Copyright (c) 1982, 2009, Oracle.  All rights reserved.
    Use SQL*Plus to execute SQL, PL/SQL and SQL*Plus statements.
    Usage 1: sqlplus -H | -V
        -H             Displays the SQL*Plus version and the
                 usage help.
        -V             Displays the SQL*Plus version.
    Usage 2: sqlplus [ [<option>] [{logon | /nolog}] [<start>] ]
      <option> is: [-C <version>] [-L] [-M "<options>"] [-R <level>] [-S]
        -C <version>   Sets the compatibility of affected commands to the
                 version specified by <version>.  The version has
                 the form "x.y[.z]".     For example, -C 10.2.0
        -L             Attempts to log on just once, instead of
                 reprompting on error.
        -M "<options>" Sets automatic HTML markup of output.  The options
                 have the form:
                 HTML [ON|OFF] [HEAD text] [BODY text] [TABLE text]
                 [ENTMAP {ON|OFF}] [SPOOL {ON|OFF}] [PRE[FORMAT] {ON|OFF}]
        -R <level>        Sets restricted mode to disable SQL*Plus commands
                 that interact with the file system.     The level can
                 be 1, 2 or 3.  The most restrictive is -R 3 which
                 disables all user commands interacting with the
                 file system.
        -S             Sets silent mode which suppresses the display of
                 the SQL*Plus banner, prompts, and echoing of
                 commands.
      <logon> is: {<username>[/<password>][@<connect_identifier>] | / }
               [AS {SYSDBA | SYSOPER | SYSASM}] [EDITION=value]
        Specifies the database account username, password and connect
        identifier for the database connection.  Without a connect
        identifier, SQL*Plus connects to the default database.
        The AS SYSDBA, AS SYSOPER and AS SYSASM  options are database
        administration privileges.
        <connect_identifier> can be in the form of Net Service Name
        or Easy Connect.
          @[<net_service_name> | [//]Host[:Port]/<service_name>]
         <net_service_name> is a simple name for a service that resolves
         to a connect descriptor.
         Example: Connect to database using Net Service Name and the
               database net service name is ORCL.
            sqlplus myusername/mypassword@ORCL
         Host specifies the host name or IP address of the database
         server computer.
         Port specifies the listening port on the database server.
         <service_name> specifies the service name of the database you
         want to access.
         Example: Connect to database using Easy Connect and the
               Service name is ORCL.
            sqlplus myusername/mypassword@Host/ORCL
        The /NOLOG option starts SQL*Plus without connecting to a
        database.
        The EDITION specifies the value for Session Edition.
      <start> is: @<URL>|<filename>[.<ext>] [<parameter> ...]
        Runs the specified SQL*Plus script from a web server (URL) or the
        local file system (filename.ext) with specified parameters that
        will be assigned to substitution variables in the script.
    When SQL*Plus starts, and after CONNECT commands, the site profile
    (e.g. $ORACLE_HOME/sqlplus/admin/glogin.sql) and the user profile
    (e.g. login.sql in the working directory) are run.  The files may
    contain SQL*Plus commands.
    Refer to the SQL*Plus User's Guide and Reference for more information.
    bcm@bcm-laptop:~$

Maybe you are looking for