wood burning stoves 2.0*
The moose likes JDBC and the fly likes Lightweight jdbc driver to connect to SQL server 2005 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Lightweight jdbc driver to connect to SQL server 2005" Watch "Lightweight jdbc driver to connect to SQL server 2005" New topic
Author

Lightweight jdbc driver to connect to SQL server 2005

Karnati Sudhakar
Ranch Hand

Joined: Aug 26, 2008
Posts: 270

Hi All,

I am building an desktop application in which i need to connect to SQL Server 2005 database.I am thinking of lightweight jdbc driver to connect to SQL server 2005.Please help me on thoughts on this.What i am actually trying to do is if i install this application on any machine they should be able to do CRUD operation with out creating any DSN.

Regards
Sudhakar


Regards
Sudhakar
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
IsnĀ“t the SQL Server 2005 JDBC driver lightweight? You may consider the jTDS JDBC driver.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41088
    
  43
What do you mean by "lightweight" in this context? Surely a jar file a few 100KB in size presents no problem in this day and age?


Ping & DNS - my free Android networking tools app
Karnati Sudhakar
Ranch Hand

Joined: Aug 26, 2008
Posts: 270

I have to admit that i know little about JDBC drivers.I just googled and followed as explained in this http://www.java-tips.org/other-api-tips/jdbc/how-to-connect-microsoft-sql-server-using-jdbc.html

Thanks
Sudhakar
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41088
    
  43
That page doesn't contain the word "lightweight" ...?

The http://faq.javaranch.com/java/GeneralJdbcQuestions page links to both jTDS and the MS SQLServer 2005 driver.
Karnati Sudhakar
Ranch Hand

Joined: Aug 26, 2008
Posts: 270

That page doesn't contain the word "lightweight" ...?

I exactly dont know what is Lightweight but my intention was to avoid creating DNS.and i am able to acheive following this link http://www.java-tips.org/other-api-tips/jdbc/how-t...oft-sql-server-using-jdbc.html

Regards
Sudhakar
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
Karnati Sudhakar wrote:but my intention was to avoid creating DNS
This makes no sense.

Just load the driver by Class#forName() yourself and use DriverManager#getConnection() to get a connection. Voila, no need for a DSN. This is regardless of the JDBC driver. The DSN is just some higher level abstraction which allows you to externalize the connection settings and/or make use of connection pooling capabilities to improve performance.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41088
    
  43
Bauke Scholtz wrote:This makes no sense. ... Voila, no need for a DNS.

So I guess it does make sense, and it's rather easily achieved. :-)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Lightweight jdbc driver to connect to SQL server 2005
 
Similar Threads
Different versions of SQL Server
Need to know Sql version.
JDBC Drivers with WAS 7
Hibernate configuration for SQL Server 2005
RAD 7.5.0 - Data Perspective - This driver is locked for use with embedded applications