Access Microsoft Access Database From Java Using JDBC-ODBC Bridge - Sample Code
By Angsuman Chakraborty, Gaea News NetworkTuesday, March 28, 2006
Previously I had provided the gist of how to access MS Access database from JDBC using JDBC-ODBC bridge. Today I will elaborate on that and provide you with two sample classes. The first - AccessJDBCUtil.java defines a method which provides you with a connection to the ms access database. The second - AccessJDBCTest.java uses the first to execute any given query (DDL & DML supported) on any ms access database and displays the result on console.
AccessJDBCUtil.java can be used as a utlity class for connecting to Access databases. The connection provides read/write access to the database. In other words you can execute queries as well as DDL supported by MS Access. It simplifies creation of the strange connection parameters.
The rest should be clearly explained by the self-explanatory code included below:
July 8, 2010: 6:18 am
plz give example where u have used any of the following classes to help ur existing code: plz reply me on my email id if u can. thankyou |
June 27, 2010: 9:17 am
I need the steps that is how to connect jsp in access dadabase and sql database. |
ashish |
VipinJeet Tripathi |
April 14, 2010: 9:46 am
I have a problem while creating runtime DSN for SQL Server in JSP.Please suggest me. |
Balaji |
March 20, 2010: 12:39 am
I am using front end as jsp with html as presentation logic and using ms acess as my back end accepting the data from the acess it is working give me some examples programs regarding this application |
deiveegan |
March 19, 2010: 1:43 am
amoll try this code it will work properly } } try { con.close(); } |
adedeji balogun |
March 16, 2010: 10:07 am
i need a code to search through a database(SQL Server) and display the results in a table.The string word will be searched in a separate frame. |
Priyadharshini.V |
February 19, 2010: 6:00 am
I need to know the sql command to count the number of attributes in Ms access database in java(using jdbc connection) |
Vishnu |
December 8, 2009: 6:32 am
Hi i want to get the 750th record from the database using simple jdbc code |
Amit |
November 10, 2009: 3:55 pm
HOW DO I INSERT AND DELETE DATE FROM DATABASE USING STATEMNET RS=ST.EXECUTEUPDATE()IN JAVA DEVELOPMENT |
c gowtham |
November 7, 2009: 1:36 am
I am doing a project in networks .. I want to know how |
doc |
October 21, 2009: 3:49 am
i am doing an assignment and i am required to import a database file to java and im nt sure of the code to use.can u plz help me out wth a simple program doing that plz. |
rakesh patil |
September 29, 2009: 6:33 am
i m not geting an ms access data base connection when i write a java program usig jdbc odbc bridge |
senthil |
September 14, 2009: 4:22 am
sir i need a code immed….. to write a java program using applet swings. front end java back end ms access. i will give a input(usre name admin and password admin) to the applet wimdow then open to the another page. that page contain simple 3 buttons. |
souvik pramanik |
August 21, 2009: 9:39 am
I have a jsp form, from where i’ve taken a value like urgent…plz help me! |
vinay |
July 30, 2009: 11:01 am
I am trying to connect ms access database using servlet(with Tomcat Server) but getting problem in connection. java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified What I do? Where I keep my database? Code: import javax.servlet.*; public class check extends HttpServlet { Connection con; Statement stmt; ResultSet rst; PrintWriter out; public void doPost(HttpServletRequest req,HttpServletResponse res) throws ServletException,IOException { try Class.forName(”sun.jdbc.odbc.JdbcOdbcDriver”); try { out.println(”Servlet with jdbc”); { String str2=(String)rst.getString(2); out.println(”"); out.println(”"+str1+”"); out.println(”"+str2+”"); out.println(”"); } out.println(”Bye”); catch(Exception e) out.println(”Exception : “+e); } } |
regz |
July 4, 2009: 1:44 pm
hi sir i’m doing a simple program on how to use the MS acces as a database but the interface is using a java, |
sharan |
June 17, 2009: 10:01 am
hi..i am doing a project in J2ME…. how to connect to msaccess…. can anyone send me a sample code… |
sri |
March 30, 2009: 10:45 am
this is my program // Connect with a url string } |
rom |
March 23, 2009: 3:05 pm
i just want to know, how to insert, delete, edit and search in java programming using DataBase via MS ACCESS |
Stephane Duplessis |
March 17, 2009: 4:16 pm
Connection issues between JSP and MS Access Anybody know why I would be getting the following error: [Microsoft][ODBC Microsoft Access Driver] System resource exceeded. The connection will work for a while … then we will start getting the above error. Rebooting the server hosting the JSP & MS Access DB will fix the issue for while. Any suggestions welcome… Here’s what we have tried Attempt 1 Attempt 2 To: |
nag |
March 16, 2009: 9:10 am
hi sir, i have some problem in using the ms access databse with swings. |
sathish reddy |
March 3, 2009: 5:00 pm
i m doing a project is (online shopping) using regards |
February 22, 2009: 8:11 pm
hi… your site is very useful for newbiz thanks for providing a good reference material for students thanks |
manoj |
February 22, 2009: 6:37 am
how to connect between java with MSAccess database with some simple example |
Amol |
February 20, 2009: 8:43 am
Hi i ve problem with this code when i run this servlet then it will display following err msage } } try { con.close(); } |
hari |
Neeraj