 |
 |
ODBC and JDBC on Mac OS X 10.3
|
 |
|
 |
|
Junior Member
Join Date: Sep 2000
Location: Sydney
Status:
Offline
|
|
Hi!
I'm currently doing a course on Java at Uni, and we have a project where we've been given an Access database file (.mdb) and a .java file which will connect to this database... The files that I am trying to edit currently aren't compiling, because the compiler could not import sun.jdbc.odbc.* ... I've searched through a number of threads on this board and through google as well, and there appear to be some places that offer this sort of software, but I'm not sure what I should be looking for exactly.
Can anyone help? I do have VirtualPC, but I would rather not have to try and develop this app under emulation... I think my PB 12" would break!
Thanks very much.
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Aug 2001
Location: Germany
Status:
Offline
|
|
Hi,
ODBC AND OS X is not so funny (you normally get no drivers!!).
I found some free JDBC drivers for mySQL and MS SQL Server but normally the drivers are expensive.
Look at this link for some examples:
http://www.sqlsummit.com/ODBCVend.htm
If it's just a practice for the Uni and you're free to choose your OS then I would export all tables to a flatfile and then use another database (e.g. mysql).
You then could use a jdbc driver and run everything on your Mac.
Mark
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Sep 2000
Location: Edmond, OK USA
Status:
Offline
|
|
The JDBC-ODBC bridge is normally part of the VM distribution, but it is probably not included on the Mac since no ODBC drivers are commonly found on a Mac. Rather than use the ODBC interface I would try to find drivers that connect directly to the database in question (Access) instead of ODBC. Even if you do get the ODBC driver functioning, where are you going to host the Access database? That will definitely require a PC (real or Virtual).
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Oct 1999
Location: San Jose, Ca
Status:
Offline
|
|
From what I can easily find, there does not seem to be any way of connecting to Access directly from a Mac. The problem is that Access does not seem to speak JDBC, only ODBC. The way of getting around this on the PC is to get a JDBC-ODBC bridge, and cross over that. This will not work on the Mac platform as there is no ODBC driver for Access. (ODBC works fine on MacOS X, there is just a lack of drivers for the big databases out there).
There are systems that will bridge this gap for you by using a second computer, and a "multi-tier" approach, but they tend to be costly commercial things, and do require a PC in the middle.
I think that Mark Goebl had the right idea: see if you can get the tables onto a MySQL/PostgrSQL database, and do things from there. If your class requires Access, then you are probably de-facto required to use a PC.
|
|
|
| |
|
|
|
 |
|
 |
|
Junior Member
Join Date: Sep 2000
Location: Sydney
Status:
Offline
|
|
I haven't been able to find anything, and exporting it all to a MySQL database is a bit of a hassle as well... This is part of a group assignment, so if I did any changes like that it would screw it up for others. I've resorted to using my work laptop, which runs Windows 2000, to do the programming.  JCreator isn't such a bad IDE, though.
Thanks for your replies!
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|