mat_boy
mat_boy

Reputation: 13676

Password not recognized in Java for MS Access

I have to import data from a MySQL DB to a MS Access DB. I use JDK8 on a Windows7Pro 64 bit.

When I run the code I get an exception at the following line of code:

String database = .../
Connection conn = DriverManager.getConnection(database, "", "mypw");

and the error is:

java.sql.SQLException: [Microsoft][Driver ODBC Microsoft Access] Not a valid password

However, when I open the db via MSAccess the password is accepted. What am I missing? Maybe something related to the user value?

Upvotes: 1

Views: 309

Answers (1)

spiderman
spiderman

Reputation: 11132

Try the username as "Admin"

I don't know why exactly it work, but I know it works.

Upvotes: 1

Related Questions