about mdb files and java

If I have an mdb file (database file), can Java access it directly without the mdb file needing to be loaded into an SQL server? If so can I also change the tables and create new ones in the mdb file without an sql server?

You can access (no pun intended ;)) it by creating an ODBC data source in Windows and use the JDBC-ODBC bridge driver (either sun’s or a third party bridge driver).
I don’t think there is a JDBC driver specifically for MS Access.
You need the Access ODBC driver installed though (for example by installing Access)

im using ms sql and already have micro$oft’s driver. So this means that any sql server just gives you a UI to the mdb file correct? I could theoretically write my own sql server in Java?

I’m confused. Isn’t an mdb file an MS Access database? ???
MS SQL Server is an entirely different beast, for which good JDBC drivers are available (as long as you avoid MS’s one).
Both should DB’s should be avoided though ;D

agreed, Ideally you should be using PostreSQL or MySQL, but I’ve used Access databases occasionally on simple websites purely for convenience sakes. Mainly for ASP stuff though. The two work well together.

D.

what are some of the downfalls of using Microsoft’s drivers and working with an mdb file?

If you want to access an MS Access .mdb file, you have to use the ODBC bridge driver, which is only really suitable for testing, really (even Sun states that it shouldn’t be used in production).
There are alternative, but commercial, ODBC bridge drivers available though. But then again, Idoubt that you will be able to access the Access database from another and non-windows machine.

The last time I checked, the SQL-server JDBC driver from Microsoft came with an installshield which installs all kinds of scary .dll files and so only works on Windows. Besides, I found it’s not exactly the fastest driver and not really stable too.
For SQL server, try jTDS (http://jtds.sourceforge.net/). It’s fast, reliable and very easy to install/use (it’s just a jar).

Or better still, embed cloudscape/derby into your app. No external stuff needed (as far as i know), pure java, and open source. I think its hosted off the Apache foundation website ?

D.

Anything is better than an Access mdb file or SQL Server (esp. with MS JDBC driver) ;D