Results 1 to 3 of 3

Thread: Any other way to load the driver other than Class.forName()

  1. #1
    Junior Member
    Join Date
    Jun 2007
    Answers
    2

    Any other way to load the driver other than Class.forName()

    Is there any other way to load the driver other than Class.forName() ?


  2. #2
    Junior Member
    Join Date
    Apr 2007
    Answers
    6

    Smile 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


  3. #3
    Junior Member
    Join Date
    May 2008
    Answers
    8

    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
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact