1

My Java application works well on two of my colleague's computers, however it will not run on mine.

The application reads a spreadsheet, creates tables in access from it and then compares them. The application is able to read and create the tables, but will not compare them.

The error I am getting is

 java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Undefined function 'replace' in expression.

I have read the other threads on this but wasn't able to gain much insight. Since we know the code works, is there something I can check on my machine that might be preventing this from working?

Any help would be greatly appreciated.

// Connection Code //

Connection dbConnection = null;
String ACCESSDB_Driver = "sun.jdbc.odbc.JdbcOdbcDriver";
String connURL="jdbc:odbc:DRIVER={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=" + databasePath.trim() + "\\" + accessFileName.trim() + ".accdb;";
9
  • which version of java are you running? Commented Jul 21, 2017 at 16:22
  • What version of the access driver do you have installed? Your coworkers? Commented Jul 21, 2017 at 16:24
  • Are you using an ODBC DSN to establish the link to the database? If so, then check the DRIVER associated with that DSN to ensure that you are using the same driver as your colleagues (i.e., (*.mdb, *.accdb) vs. just (*.mdb)). Commented Jul 21, 2017 at 16:27
  • I believe I am using Java SE 1.7 @inbinder Commented Jul 21, 2017 at 16:37
  • I checked in ODBC Data Source Administrator and I have both access drivers. 6.0.1 for (.mdb) and 12.0 for (.mbd, *.accdb) We are using *.mbd, *.accdb to connect. @GordThompson Commented Jul 21, 2017 at 16:38

1 Answer 1

1

The answer to this question was I was using Microsoft Access Driver (*.mdb, *.accdb) 12.x instead of 14.x

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.