Mac Simple solution wanted for a simple(?) problem

comike011

macrumors newbie
Original poster
Jun 30, 2005
6
0
New York, New York
I am completely new to both mac and java programming. So to help with the learning process I took on a project that requires me to connect to a Microsoft access database and make updates via a java program. Ive tried to do this in both xcode and eclipse but both resulted in a little less than no progress. What can I do to connect to this database? What do I need for it? Is this even possible? PLEASE HELP!!!
 

mkrishnan

Moderator emeritus
Jan 9, 2004
29,641
12
Grand Rapids, MI, USA
Are you trying to access the MS Access DB while it sits on the Mac, or while it is being hosted for ODBC by a Windows computer? How far have you gotten in getting the Mac to talk via Java to the Win computer, assuming the latter?

I've done this in Java on Windows, but it's been a while.
 

mkrishnan

Moderator emeritus
Jan 9, 2004
29,641
12
Grand Rapids, MI, USA
comike011 said:
Presently the database (.mdb file) is on the mac so there aren't any concerns with connecting to another machine. Its all internal.
I'm not sure what you're describing is possible. The way I understand the kind of thing you're trying to do, you write in JDBC calls within Java, and then the JRE uses the JDBC-ODBC bridge to talk to ODBC, and ODBC talks to MS Access to change the database file. I don't think that you can modify an Access database that's sitting on a Mac using ODBC, because there's no application that actually has the capability to open the database file.

But, if you intend to use a drastically different method to access the database, can you please explain farther?
 

comike011

macrumors newbie
Original poster
Jun 30, 2005
6
0
New York, New York
This is a problem that I was worried about, but what the person Ive been talking with about this and me are thinking is that the database file can be used as a sort of "black box". The only way to edit this file would be via the java program that can access it. Is a program needed that can use the file independently of the java program?
 

ChrisBrightwell

macrumors 68020
Apr 5, 2004
2,294
0
Huntsville, AL
You need something to serve up the database file. Either you have to custom-write a parser (good luck) that can load it and build it in memory in some useful, tangible form or you find a server.

MS has ODBC, which works decently well for small projects. It's not avaialble for OS X, though.

You can export the DB to SQL and used JDBC calls to the SQL server in OS X.

There's no way to directly access an Access database file, though. Not the way you want to.