-
Junior Member
Any other way to load the driver other than Class.forName()
Is there any other way to load the driver other than Class.forName() ?
-
Junior Member
Re: Any other way to load the driver other than Class.forName()
class.forName() is valid for any class object instatiation at run time, you can create a static object of particular driver type & can continue with the same
-
Junior Member
Re: Any other way to load the driver other than Class.forName()
Alternative way is by creating Driver object
Driver d=new foo.bar.MyDriver();
//here "foo.bar" is an third party that may be mysql or orcale.
Connection con=d.Connect();
The best way is using class.forName() because we can use more than 1 driver in this case, but by using Driver object we can use only one particular driver.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules