File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes IDEs, Version Control and other tools and the fly likes Need to connect to MSAccess database from eclipse ganymede Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Need to connect to MSAccess database from eclipse ganymede" Watch "Need to connect to MSAccess database from eclipse ganymede" New topic
Author

Need to connect to MSAccess database from eclipse ganymede

Maan Suraj
Ranch Hand

Joined: Dec 20, 2007
Posts: 293
i need to know how can i connect to MSAccess database. I would like to know the changes to be made to "server.xml" file and what other changes do i need to add to eclipse


Man Suraj
Someone says "Impossible is nothing". The man next him says "Let me see you licking your elbow tip!"
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5778
    
    7

Do you already have a JDBC driver for Access, or will you be using the JDBC-to-ODBC bridge? Either way, the steps should not be that different for connecting to any other database: first go to the Preferences dialog and add the driver into the Data Mnagament | Connectivity | Driver Definitions dialog, then open a Data Source Explorer window, right-click on Database Connections, choose New, select the driver you defined earlier.

And what is server.xml? There is no such file in my Eclipse installation.


JBoss In Action
Maan Suraj
Ranch Hand

Joined: Dec 20, 2007
Posts: 293
Peter Johnson wrote:Do you already have a JDBC driver for Access, or will you be using the JDBC-to-ODBC bridge? Either way, the steps should not be that different for connecting to any other database: first go to the Preferences dialog and add the driver into the Data Mnagament | Connectivity | Driver Definitions dialog, then open a Data Source Explorer window, right-click on Database Connections, choose New, select the driver you defined earlier.

And what is server.xml? There is no such file in my Eclipse installation.


I thought of using the JDBC-to-ODBC bridge. But anyways could you please tell me the difference between the two and what is the difference?

With server.xml, i meant the file in tomcat. Do i need to add my application name/prjct name which access the DB in there?
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5778
    
    7

please tell me the difference between the two


Between which two? Between ODBC and JDBC, or between a JDBC driver and a JDBC-to-ODBC bridge? For the later, Sun docs on JDBC describes the different types of JDBC drivers.

Do i need to add my application name/prjct name which access the DB in there?


Originally you asked how to connect Eclipse to MS Access. Have you now changed your mind and instead want to know how to get your app, which is deployed in Tomcat, to access an MS Access database? If so, this topic should be moved to the Tomcat forum (but I'll wait for your response before doing so).
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15641
    
  15

You should NOT be using MS Access in a web application. It isn't designed for multiple concurrent users and web apps MUST be. If you attempt to store data in Access from a webapp, your database will end up corrupted.

If you absolutely have to use a Windows-only DBMS with a webapp, get a copy of SQL Server, There's a freebie version available from Microsoft that works quite well, although I recommend you use the Sourceforge.net JDBC driver instead of Microsoft's. Their current JDBC driver has some flaws in it that were fatal to my latest app.

Finally, don't define the database parameters in server.xml. That's been bad practice since Tomcat4. For the most part you shouldn't be modifying server.xml. Instead define the webapp you're deploying in a separate context file. The context files are placed in TOMCAT_HOME/conf/Catalina/localhost and they consist of a single <Context> XML construct. That's where you tell tomcat the application URL context, where the WAR is located, your database connection pool definition (which was what you were asking about) and optionally, any overrides to JNDI definitions for the webapp.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need to connect to MSAccess database from eclipse ganymede
 
Similar Threads
JDBC
How to connect msaccess database from myeclipse IDE tools
JDBC
Database cannot be connected
jdbc advanced