Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Issue in setting password for existing in JDBC Access Workgroup (MDW) Java

1010295May 22 2013
Here is my Scenario
I have MS Access DB (MDB file), and work group security file. I have credentials which have all the permit (Administrator user). This DB and MDW file is created on some other computer and i am using it on my computer now. What I am able to do till now is, I can log in the DB with different user name and password which are existing in the DB. Verified this by using Correct user name and wrong password It give error, but correct credentials it logins. Now I need to create a interface In Java to basic functionality. 1. Change password of currently logged user.

Change password of current user

Following is my code to change the password

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String database = "jdbc:odbc:"+"mdbTEST";
// mdbTEST is created in System DNS which uses SECURED.MDW file and
// ExtendedAnsiSQL is set to 1
conn = DriverManager.getConnection(database, "administrator", "hello");

String q = "ALTER USER "+uname+" PASSWORD "+newPass+" '"+oldPass+"'";
stmt = conn.createStatement();
stmt.execute(q);

It returns successful. But when I try to log in the with the username and new password it says wrong passowrd and even the old password stops working.

Moreover, I tried to read all the username and passwords in the WorkGroup file using some third party software, it shows the new password is updated correctly in the MDW file.

I am using JDK 1.7 on Windows XP 32 bit. What can be the problem? Am I doing something wrong here? Thanks in Advance.

Comments

Processing
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jun 19 2013
Added on May 22 2013
0 comments
127 views