Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2004

    Unanswered: jdbc to MS Access problems

    Trying to query some MS Access DB, using this connection string

    jdbcdbcriver={Microsoft Access Driver (*.mdb)};DBQ=C:/Documents and Settings/echan/Desktop/db1.mdb;DriverID=22;READONLY=true

    When i call DriverManager.getConnection(....), it throws this exception

    java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name too long

    Am i doing something wrong? Is there anyway to work around this? and isn't it silly to put a limit on the data source name?

    thanks in advance

  2. #2
    Join Date
    Sep 2004
    wrong syntax i think - use this Class.forName("jdbc:Odbc:<your_dsn_name>");

    use dsn name..

Posting Permissions

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