If i give two Class.forName how can i konw which driver is loading? whether it is possible or not?

Questions by vengal79

Showing Answers 1 - 11 of 11 Answers

saumendra

  • Sep 4th, 2006
 

ans:-There is method in DriverManager Class i.e getDriver.which return all the driver class that  resister with DriverManager.from there we can check which driver is loading or not.

  Was this answer useful?  Yes

Supraja

  • Dec 9th, 2006
 

Get the class object from class.forName and later use getName() on the class object.

eg.,

Class classObj = Class.forName(driver);

classObj.getName() returns the Driver Name.

  Was this answer useful?  Yes

Supriya Ahire

  • Feb 2nd, 2007
 

Hello, Yes , U can use two Class.forName() as Drivermanager keeps array internally to store the Drivernames so whichever come first will we loaded & used.Regards, Ms.Supriya Ahire

  Was this answer useful?  Yes

Yes it possible.... Please see public static Enumeration getDrivers() method in java.sql.DriverManager.DriverManager class which gives the complete list of Drivers available for use as an Enumeration.

Thanks,
Vinay

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions