Results 1 to 10 of 10

Thread: Jdbc Odbc

  1. #1
    Senior Member Kezzer's Avatar
    Join Date
    Sep 2003
    Posts
    4,863
    Thanks
    12
    Thanked
    5 times in 5 posts

    Jdbc Odbc

    I've just got a piece of software I have to write at work which incidentally will be pretty complex, but it's main function is its connection to a database. It has to be an ODBC connection thus my DriverManager is using JdbcOdbcDriver which doesn't appear to be working.

    The error message being returned states "No suitable driver found for <server URL here>". I'm assuming I need an ODBC driver installed but preferably I want to avoid using Oracle's because it's something like a 200MB install.

    Anyone have any ideas on what's the best to use? I'd prefer it to be lightweight, it's only handling the connection after-all.

    Cheers

  2. #2
    Chillie in here j.o.s.h.1408's Avatar
    Join Date
    Dec 2005
    Location
    a place called home
    Posts
    8,543
    Thanks
    757
    Thanked
    256 times in 193 posts
    • j.o.s.h.1408's system
      • Motherboard:
      • ASUS P6T Delux
      • CPU:
      • Intel core i7 920 @ 3ghz
      • Memory:
      • 3GB DDR RAM
      • Storage:
      • 1TB Samsung F1, 500GB Seagate baracuda + 320gb Seagate PATA +150GB WD PATA
      • Graphics card(s):
      • EVGA 480GTX SC edition
      • PSU:
      • Seasonic M12 600W Module PSU FTW
      • Case:
      • Lian Li PC-A7010B (the rolls royce of pc cases)
      • Operating System:
      • vista ultimate edition and windows xp
      • Monitor(s):
      • 22inch 2005FPW dell monitor
      • Internet:
      • 24mb BE There Broadband
    Try MySQL? what database are you trying to connect to? oracle?

  3. #3
    Large Member
    Join Date
    Apr 2004
    Posts
    3,720
    Thanks
    47
    Thanked
    99 times in 64 posts
    More importantly what OS.
    To err is human. To really foul things up ... you need a computer.

  4. #4
    Senior Member manwithnoname's Avatar
    Join Date
    Dec 2005
    Posts
    1,050
    Thanks
    17
    Thanked
    26 times in 25 posts
    I would consider trying to set up a test environment that matches the final deployment machine, OS and odbc drivers. So if 200MB install is what will be on deployment machine I recommend you use it.

    If you cannot match the deployment machine you can do some limited testing by installing any odbc driver and configure this , assuming you have the application for the odbc driver installed as well . e.g. If you have a windows machine and MS access use this (you can use odbc with Excel - but I have never tried it).

  5. #5
    Large Member
    Join Date
    Apr 2004
    Posts
    3,720
    Thanks
    47
    Thanked
    99 times in 64 posts
    If it's as complex as you say too you'd be better off using the javax.sql.DataSource Interface rather than a legacy DriverManager object too.
    To err is human. To really foul things up ... you need a computer.

  6. #6
    Senior Member Kezzer's Avatar
    Join Date
    Sep 2003
    Posts
    4,863
    Thanks
    12
    Thanked
    5 times in 5 posts
    Yes, I'm trying to connect to an Oracle database in Windows.

    I got further than before, I'll have to wait until I get back to work until I can see how far I got though. It's still not connecting though.

    Cheers

  7. #7
    Senior Member
    Join Date
    Aug 2005
    Posts
    213
    Thanks
    0
    Thanked
    0 times in 0 posts
    JDBC suggests you are using Java. Oracle has a type 4 JDBC driver (pure Java) available. Typically the file is called "classes12.zip" (for jdk 1.2 and above). I suggest you use this instead of the JDBC - ODBC bridge as more features are supported and its native java.

    Also means you can run this on any OS and not required to have any ODBC layer in between.

  8. #8
    Large Member
    Join Date
    Apr 2004
    Posts
    3,720
    Thanks
    47
    Thanked
    99 times in 64 posts
    I don't understand what the problem is, how did you manage to create a JDBC URL to connect to the the database if it hasn't been ODBC configured?
    To err is human. To really foul things up ... you need a computer.

  9. #9
    Senior Member Kezzer's Avatar
    Join Date
    Sep 2003
    Posts
    4,863
    Thanks
    12
    Thanked
    5 times in 5 posts
    Okay so it's literally a case of putting the classes12 file in the classpath for compilation?

    yamangman, I wish I knew, I'm so utterly clueless about this stuff that I just don't understand it for some reason.

    The part I don't understand is whether I'm meant to have the ODBC drivers installed or not, then there's the JDBC driver required etc. I couldn't find any document which was clear about it.

  10. #10
    Senior Member
    Join Date
    Aug 2005
    Posts
    213
    Thanks
    0
    Thanked
    0 times in 0 posts
    If you are using JDBC (and not the ODBC bridge) you need the JDBC api which should be part of the JDK. The classes12.zip has to be on your runtime path as its oracle's implementation of the JDBC api to their database. You should find plenty of examples of the JDBC against oracle on the web. Just specify the correct connection string and the correct credentials and you should be good to go.

    You would not need the JDBC ODBC driver, or any ODBC drivers or ODBC entries for this to work.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. ODBC for WinXP
    By [GSV]Trig in forum Software
    Replies: 4
    Last Post: 27-03-2006, 02:57 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •