File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Alternative method of Connecting to database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Alternative method of Connecting to database" Watch "Alternative method of Connecting to database" New topic
Author

Alternative method of Connecting to database

amit smal
Greenhorn

Joined: Mar 17, 2005
Posts: 10
Hi all,
Is there any way to connect to database without using class.forName("...")??

Regards,
Amit.
Ram Kumar Subramaniam
Ranch Hand

Joined: Jan 17, 2003
Posts: 68
you could configure a DataSource and use it to get a connection to connect to the database.
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Class.forName() doesn't connect to a database, it loads the driver. You can also load the driver using -Djdbc.driver=<driver class>
amit smal
Greenhorn

Joined: Mar 17, 2005
Posts: 10
Will be this be defined in system properties file??

Regards,
Amit.
Neeraj Dheer
Ranch Hand

Joined: Mar 30, 2005
Posts: 225
either in system properties file or at command line while running the app(if applicable)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Alternative method of Connecting to database
 
Similar Threads
Tech Word Game
Large Files
Sharing data between web app's
Shopping Cart - Part 2
share data