jQuery in Action, 3rd edition
The moose likes JDBC and Relational Databases and the fly likes JDBC-ODBC Bridge VS JNDI Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "JDBC-ODBC Bridge VS JNDI" Watch "JDBC-ODBC Bridge VS JNDI" New topic


Lokendra Shekhawat
Ranch Hand

Joined: Jun 08, 2009
Posts: 40
Hi friends, i am working on my college project. My project is working perfectly. i used JDBC-ODBC bridge driver. but my teachers says that this driver is very useful for testing, but not for normal use, i.e., when we deploy our application to the web server over the internet, its not a good idea to use JDBC.ODBC bridge driver. Instead we should use JNDI driver.
Is this true?
I don't know much about JNDI connectivity. i am able to connect Derby database using the JNDI. but how to connect to SQL database using NetBeans IDE (i am using 6.5).
My teachers have no idea how to connect to SQL database using JNDI. whenever i ask them about it they say to connect to the SQL server we need to install a driver in NetBeans. they always say that.
Can/t we connect to SQL database using JNDI in NetBeans IDE 6.5 without installing any extra driver?

Please help me i don't know much about JNDI connectivity to SQL Database. will anyone give me some example or tutorial link.

SCJP5 93%. SCWCD 98%.

Visit my website http://www.rajasthan4tourism.com for information about rajasthan tourist places and much more.....!!!
Jan Cumps

Joined: Dec 20, 2006
Posts: 2565

Hi Lokendra,

There is no such thing as a JNDI driver. JNDI is a mechanism to look up things. So I am as confused as you are.

The only things I can think about is:
  • The teacher wants you to use the proper JDBC driver for your database, and not the ODBC bridge (this is very easy. The correct jdbc drivers are often available from the web, and switching from the bridge to the proper JDBC driver is not difficult), or
  • The teacher wants you to use an application server, and register your database in the JNDI registry, and use it from there (http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/Resources2.html)

  • But I think you will have to go back to the teacher to clear out the doubts.

    OCUP UML fundamental and ITIL foundation
    Lokendra Shekhawat
    Ranch Hand

    Joined: Jun 08, 2009
    Posts: 40
    can you give me a link which shows the example to connect SQL Server using JNDI in NetBeans 6.5 IDE.
    I agree. Here's the link: http://aspose.com/file-tools
    subject: JDBC-ODBC Bridge VS JNDI
    It's not a secret anymore!