Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

can I change JDBC Driver ?

 
naved momin
Ranch Hand
Posts: 692
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my application i am using JDBC-ODBC bridge and in the ODBC Data source I am selecting a SQL Server driver, I have told that I should use native driver to connect to MSSQL under windows rather than JDBC-ODBC, so now my question is if i changed the driver does it will break my code because my code heavily use commands to communicate with DB ?
and also for MSSQL which driver should I use which will give me a better performance than JDBC-ODBC bridge ?
and if any one knows any help tutorial which shows how to use that driver than that will be awesome.
thanks
 
Tim Moores
Bartender
Posts: 2730
36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wouldn't use a native driver for anything these days; type 4 drivers have become very good over the years. Microsoft provides one for SQLServer free of charge. I don't think there should be any significant problems substituting one driver for the other.
 
Rob Spoor
Sheriff
Pie
Posts: 20511
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think that with "native driver" Naved meant a driver dedicated for that particular RDMS.

Provided you only used the interfaces from the java.sql and javax.sql packages and kept the database specific code limited to the loaded class and connection String, then the only thing that could break code would be any RDMS specific queries. I've worked with an older Oracle RDMS that didn't support joins the regular way with INNER JOIN and LEFT OUTER JOIN; instead it used a WHERE clause with a (+) after a column to indicate a LEFT or RIGHT OUTER JOIN. For instance, would translate to . Unless you have that such an RDMS you should be just fine.
 
Martin Vajsar
Sheriff
Posts: 3752
62
Chrome Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The suggestion to use a "native driver" came probably from me in the other thread started by Naved. I'm very sorry for the confusion, by "native driver" I actually did mean the "type 4 driver".
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic