File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes Connect to MS Access problem. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Connect to MS Access problem." Watch "Connect to MS Access problem." New topic

Connect to MS Access problem.

Boris Ackerman

Joined: May 02, 2002
Posts: 1
After connect to MS Access with sun.jdbc.odbc.JdbcOdbcDriver driver I call getMetaData()
function and after that I try to call getPrimaryKeys(null , null , "Table Name") .
Here I get SQLException , that say - The Driver don't support this function.
Any body can help me , pls.
David O'Meara

Joined: Mar 06, 2001
Posts: 13459

Your only real options are either live without the function, or find another driver to do the operation. The JDBC API defines a bunch of interfaces and the methods they should implement, but there is no (real) way of enforcing this. If the method isn't there, it isn't there.
Since you are using MSAccess and JDBC-ODBC, I'd say you're unlikely to find a workable solution. I always recommend changing databases, since MSAccess is pretty unsuitable. Try MySQL?
David O'Meara

Joined: Mar 06, 2001
Posts: 13459

The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at .
We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please re-register and select a new name which meets the requirements.
I agree. Here's the link:
subject: Connect to MS Access problem.
It's not a secret anymore!