Results 1 to 3 of 3
  1. #1
    kkji is offline Member
    Join Date
    Aug 2011
    Posts
    54
    Rep Power
    0

    Default which one is better and why?

    for connecting ms-access
    DriverManager.getConnection("jdbc:odbc:Driver={Mic roSoft Access Driver (*.mdb)};DBQ=database.mdb");
    above line is good or below line
    DriverManager.getConnection("jdbc:odbc:Driver:dsnn ame",""."");

  2. #2
    kkji is offline Member
    Join Date
    Aug 2011
    Posts
    54
    Rep Power
    0

    Default Re: which one is better and why?

    for me DriverManager.getConnection("jdbc:odbc:Driver:dsnn ame","".""); works fine but not able to execute the other one.

  3. #3
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    8

    Default Re: which one is better and why?

    You want to use the dsnless whenever possible as it at least takes you step further away from external odbc configurations that have to be done in order to even use the code.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •