facebook

JDBC-ODBC Bridge in the Database Explorer

  1. MyEclipse IDE
  2.  > 
  3. Installation, Configuration & Updates
Viewing 15 posts - 1 through 15 (of 27 total)
  • Author
    Posts
  • #264798 Reply

    architect-01
    Member

    Hi,
    I am new to MyEclipse and wanted to use the JDBC-ODBC Bridge to connect to an Access database. How can I do this ? Is there a jar in the standard JDK to use with the database explorer ? Could you send me the steps on how to do this ? The documentation has no mention of this.

    Also on another thread. Any idea when the tutorials will be updated the current ones are very out of date with the MyEclipse 5.1 version.

    Thanks for the help

    Paul

    #264828 Reply

    Riyad Kalla
    Member

    Paul,
    While this will technically work (follow the same DB doc, but instead use the default JDBC-ODBC connection) the JDBC-ODBC driver is horrible and won’t work for any real application development, like using hibernate or the like.

    #264833 Reply

    architect-01
    Member

    Thanks for getting back to me but i dont know how. The doc says pull in a driver jar. I do not know where it is ? I figured it would be terrible. We are just using this as a POC to get more MyEclipse usage here.

    #264835 Reply

    Riyad Kalla
    Member

    Sorry I should have clarified. Because the JDBC-ODBC driver is already setup for you (it’s added by default in clean installs of MYEclipse) there is no driver to configure. You just setup a new connection, and when asked for the driver to use, you scroll down and select the JDBC-ODBC driver connection.

    Also a heads up, if an operation you are performing fails, try checking your log file <workspace dir>\.metadata\.log, it might shed some light on why the operation failed, such as “Driver does not support XYZ” exceptions.

    #264837 Reply

    architect-01
    Member

    I tried downloading the HXTT Access pure JDBC Database driver http://www.hxtt.com/access.html. I am still getting and error when i try to connect. Access_JDBC30.jar. How do I get this to work ?? Please get back to me when you can

    Thanks

    #264839 Reply

    Riyad Kalla
    Member

    Paul,
    I will outline each step.

    1) Start with the DB Tutorial here: http://www.myeclipseide.com/images/tutorials/quickstarts/dbexplorer/

    2) You can skip all of section 4.1 because the driver you need (ODBC-JDBC) is already configured for you. You just need to select it (see screenshot)

    3) Starting with section 4.2, you need to create a connection to your ODBC source using your ODBC-JDBC driver (see screenshot).

    And after that, you just use the connection to connect to your DB, there isn’t much more to cover. Let me know if you get hung up on something specific.

    Attachments:
    You must be logged in to view attached files.
    #264844 Reply

    architect-01
    Member

    Hi,
    I cannot use the JDBC-ODBC connection because my machine does not have admin rights. I have to use a plain JDBC driver for access. HXTT has one. I have been tring to connect though MyEclipse and keep getting the following error.

    Error while trying to login to database
    Unable to create connection. Check your URL

    Could you give me an example of using Access with just JDBC.

    I tried
    jdbc:access:C:\java\data\Test.mdb but got the error.

    Does anyone have an example of this. I need to set this up to demo MyEclipse at my company.

    Thanks

    Paul

    #264848 Reply

    Riyad Kalla
    Member

    Paul,
    I have never used HXTT’s driver, you would have to check with them and their documentation what the URL will be. If it’s a JDBC-ODBC driver like the one in the JDK is, then you need to provide a name that the ODBC datasource is being exposed as.

    #264853 Reply

    architect-01
    Member

    Hi Ryad,
    Do you have an example of any JDBC driver connecting to Access that you could send me using MyEclipse ?
    Thanks
    Paul

    #264857 Reply

    Riyad Kalla
    Member

    Paul,
    Unfortunately no. I don’t have access (or access to it, no pun intended) and asked around the office and the fellows I asked didn’t have it either, sorry.

    #264860 Reply

    architect-01
    Member

    Riyad,
    Could you give me an example of connecting to a HSQLDB database. If I cant use access I be able to use this ?
    Thanks

    Paul

    #264862 Reply

    Riyad Kalla
    Member

    I’m happy to give you pointers.

    1) You will start with this document: http://www.hsqldb.org/doc/guide/ch03.html

    2) Because HSQLDB can run as an in-memory DB, it sort of works like Magic. You will setup a new driver, and select the hsqldb.jar file, which should auto-detect the JDBC driver class name and hit OK.

    3) When you create a new connection using that driver, your connection string will look like:
    jdbc:hsqldb:mem:memdbid

    with name “sa” and blank password.

    4) When you hit connect, you will immediately be connected to the DB instance (I believe invoking the driver actually creates the in-memory instance… it’s sort of slick).

    And from there you should be fine. A lot of our users make use of HSQLDB and it seems to have a very robust JDBC driver so you should be able to do most of your work with it.

    #264952 Reply

    architect-01
    Member

    Could you tell me how to connent to Apache Derby ? I have not been able to connect to any databases.

    #264953 Reply

    Riyad Kalla
    Member

    How do you currently have Derby setup and how do you currently have your connection setup?

    #264975 Reply

    architect-01
    Member

    Hi Riyad,
    I just just downloaded the Derby zip file, unzipped it into a directory to be simple. I could really use some help as I cannot use Access or ODBC to demo MyEclipse because that would change the Windows registry and our PC’s do not have admin rights.

    Could you provide and example of and unzipped derby and a connection string to it. I am not using the HSQLDB because I want to persist my sample data.

    Thanks

    Paul

Viewing 15 posts - 1 through 15 (of 27 total)
Reply To: JDBC-ODBC Bridge in the Database Explorer

You must be logged in to post in the forum log in