• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDBC-ODBC Bridge VS JNDI

 
Lokendra Shekhawat
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Jan Cumps
Bartender
Posts: 2602
13
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
     
    Lokendra Shekhawat
    Ranch Hand
    Posts: 40
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    can you give me a link which shows the example to connect SQL Server using JNDI in NetBeans 6.5 IDE.
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic