This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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.
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.
Joined: Mar 22, 2005
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. :-)