ACCESS 2000 Security and JAVA

S

straybullet

I have set up a userID and password on the ACCESS database, which if I
click on the MDB file works fine.

However, I can connect and use the database from a Java Application
without any password or userID set

eg

driverName = props.getProperty("driverName");
dbUrl = props.getProperty("dbUrl");
userId = props.getProperty("");
passWord = props.getProperty("");

try{

// load the driver
Class.forName(driverName);

// get the connection
musicConn = DriverManager.getConnection( dbUrl, userId, passWord);

etc etc...


Can anyone tell me what else I need to do to force the Java
application conform to the restrictions that I have set.
 
J

JScoobyCed

straybullet said:
I have set up a userID and password on the ACCESS database, which if I
click on the MDB file works fine.

However, I can connect and use the database from a Java Application
without any password or userID set

eg

driverName = props.getProperty("driverName");
dbUrl = props.getProperty("dbUrl");
userId = props.getProperty("");
passWord = props.getProperty("");

try{

// load the driver
Class.forName(driverName);

// get the connection
musicConn = DriverManager.getConnection( dbUrl, userId, passWord);

etc etc...


Can anyone tell me what else I need to do to force the Java
application conform to the restrictions that I have set.

What is the value of the "dbUrl" property. Does it include the username
and password?
 
A

Alun Harford

straybullet said:
Can anyone tell me what else I need to do to force the Java
application conform to the restrictions that I have set.

If I remember correctly, the MS Access password system is there so that
users don't wander into the 'admin' bit, rarther than an attempt to provide
real security. I believe it lets you encrypt the file based on the password
though, which may or may not provide a bit of pseudo-security.
Sorry, but the customer base of the application does not typically want to
lose their data if they forget the password.

Alun Harford
 
H

harry.hasson

sorry should have included that
String driverName = "sun.jdbc.odbc.JdbcOdbcDriver";
String dbUrl = "jdbc:eek:dbc:Media"; //the DataSource name

String userId = "";
String passWord = "";
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,192
Latest member
KalaReid2

Latest Threads

Top