Home Answers Viewqa JDBC how i can access Microsoft Access database by java program

 
 


Unde Kuldip Ramdas
how i can access Microsoft Access database by java program
1 Answer(s)      a year ago
Posted in : JDBC

how i can access Microsoft Access database by java program ? if any package or jar file required then please specify it. please give java source code for such database connectivity in short

View Answers

June 8, 2012 at 4:35 PM


Java MS Access database connectivity

Follow these steps:

1)Go to the start->Control Panel->Administrative Tools-> data sources.

2)Click Add button and select the driver Microsoft Access Driver(*.mdb).

3)After selecting the driver, click finish button.

4)Then give Data Source Name and click ok button.

5)Your DSN will get created.

6) Restart your compiler and compile the given code. It will create table in MS access database.

import java.sql.*;

public class CreateTable {
  public static void main(String[] args) throws Exception {
    Connection conn = DriverManager.getConnection("jdbc:odbc:student");
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Statement st = conn.createStatement();
    st.executeUpdate("create table employee (empid int,empname varchar(30));");
    System.out.println("Table is created successfully!");
    st.executeUpdate("insert into employee (empid,empname ) values (1,'Roseindia')");
    System.out.println("Data is inserted successfully!");
    st.close();
    conn.close();
  }
}









Related Pages:
The JDBC API to access a desktop database like Microsoft Access over the network.
The JDBC API to access a desktop database like Microsoft Access over the network.  How can I use the JDBC API to access a desktop database like Microsoft Access over the network
retreiving data from microsoft access database
retreiving data from microsoft access database  How can i retrieve data from microsoft access when i have select the vaules in combo box and text box. When i select these values... i want to retrieve the corresponding columns
how to access the MS ACCESS database with java
how to access the MS ACCESS database with java   how to access the MS ACCESS database with java how can we insert,delete,update,search records of ms access with java   Java MS Access database connectivity Follow
mysql- microsoft access
mysql- microsoft access  hello, In all your tutorials, you have used Mysql. If instead of mysql i use microsoft access so how will it differ and wat will be the connection steps
connecting to access database
connecting to access database  print("code sample");Hi I Write java projrame in notepad,I use 3 notepad pages to write this program,when i run... Access Driver(*.mdb) Select database name and Create the DSN name (e.g access
MS ACCESS
CONNECTION (MA ACCESS) LET ME KNOW IN MY PROGRAM WHERE I AM GOIN WRONG PLEASE...MS ACCESS  i have done : Insert form data into MS database...-> data sources. 2)Click Add button and select the driver Microsoft Access
MS ACCESS
CONNECTION (MA ACCESS) LET ME KNOW IN MY PROGRAM WHERE I AM GOIN WRONG PLEASE...MS ACCESS  i have done : Insert form data into MS database Follow...-> data sources. 2)Click Add button and select the driver Microsoft Access
MS ACCESS
CONNECTION (MA ACCESS) LET ME KNOW IN MY PROGRAM WHERE I AM GOIN WRONG PLEASE...MS ACCESS  i have done : Insert form data into MS database...-> data sources. 2)Click Add button and select the driver Microsoft Access
how to access the MS ACCESS database with java - Java Beginners
how to access the MS ACCESS database with java  how can we insert,delete,update,search records of ms access with java
Connect database in Access to Netbean?
Connect database in Access to Netbean?  how to connect database in micrsoft access to Netbean?i know it can be connected by using JDBC-ODBC bridge, can i know the steps in connecting the database? Is there any source code
stock checking in java with backend as access
stock checking in java with backend as access  Hi, I am doing a project in java,Can i able to know how to check the stock availability of a product in java...my back end connectivity is ms-access from the database ,i hv
applet connected to table in MS Access database
applet connected to table in MS Access database   i have connected my java code with the MS access database and this is my code, can anyone tell me...:DRIVER={Microsoft Access Driver (*.mdb)};DBQ=faltu.mdb"; // String url = "jdbc
how to close the connection object,statement object,resultssetobject when using the microsoft access a database - SQL
how to close the connection object,statement object,resultssetobject when using the microsoft access a database   Hi Friend, I am developing the webapplication using the jsp(business logice-jsp).backend is microsoft access
How can I access databse through JSP. I am using postgresql-8.4.4-1-windows as database and jboss-4.0.5.GA as server.
How can I access databse through JSP. I am using postgresql-8.4.4-1-windows as database and jboss-4.0.5.GA as server.  I am using postgresql-8.4.4-1... netbeans-6.1-ml-windows.How can I set up connection to database? Please help me
Use JDBC to connect Microsoft Access
Use JDBC to connect Microsoft Access  How to use JDBC to connect Microsoft Access
Create Reports in Java with access database - Java Beginners
Create Reports in Java with access database  Hello Sir How to Create Reports of Any Type using Java when i submit data is stored in the MS access... File or any type of Report and then i want to print it. How I can Generate
jfreechart display from access database data.
is to be done in a servlet.. Note that it is a access made database. How can I...jfreechart display from access database data.  I have made a database... to retrieve the data from the access database using prepared statement and then display
How can I protect my database password ?
How can I protect my database password ?   How can I protect my database password ? I'm writing a client-side java application that will access a database over the internet. I have concerns about the security of the database
how to access database in applet
how to access database in applet  HI... I'm having an applet where we should display the database values in the applet... It works fine in the local... in the local system.. I created a policy file and also added that url
How to access (MySQL)database from J2ME?
How to access (MySQL)database from J2ME?  I am new to J2ME. I am using NetBeans. Can anyone help me? How to access (MySQL)database from J2ME? ( I search a lot I found that there is need to access database through servlet
How to Store Float Value into Access Database - Java Beginners
How to Store Float Value into Access Database  Hello sir,I want to Store Student Marks Percentage into Access Database in Float Value how i can Store.... To store the double value in Access database, you need to set the datatype
How to Open Picture From M.S. Access Database using Java Servlet ?
How to Open Picture From M.S. Access Database using Java Servlet ?  ... Database But i m still not able to open this picture through Java using M.S. Access and i wants to open this Picture On Web Browser using Java Servlet anybody can
Access and Java - Java Beginners
: MS Access, A employee database using Access and SQL which keeps the records...Access and Java  A construction company has specialized in planning... to develop a system with programs that can be used to register the hours of employees
Servlet and Access - JDBC
. And how to save image in access database cause i am using Microsoft access 2003 so how to save the image file in access Database. please do reply...Servlet and Access  How to use RequestDispatcher in servlet to call
jfreechart displaying chart from access database
and then the chart should be displayed on a jsp..how can i do it..pls reply..its...jfreechart displaying chart from access database  I have these 2 codes. array.java----in which i retrieve the values from the database . import
Migrating sql database to Access through coding
Migrating sql database to Access through coding  How can i migrate SQL database(table) to My access through coding
why it is very slow when I am using the backend as microsoft access file for running the java webapplication - SQL
why it is very slow when I am using the backend as microsoft access file for running the java webapplication  I am using the backend as microsoft access file for running the java webapplication.it is very slow when twoor mor
DataBase connectivity in java with Microsoft sql server2000 - JDBC
DataBase connectivity in java with Microsoft sql server2000  How i can achieve database connectivity with Microsoft sql server2000 in my java source code
jsp to access query
jsp to access query  How to insert the values from jsp to access ?   Here is a jsp code that insert the values to MS access database... Tools>> data sources. 2)Click Add button and select the driver Microsoft
MS access
MS access  how do i access my Ms-Access file placed in the same jar file where my application code/class file r present??? Want to access it via Code. Can anyone help me ? Please give reply urgent...   give me reply
Access specifiers
Access specifiers  Why we are giving "public static void main"? How... as it provides the "entry point" for the program. Whenever the program executes, the main method is always called. It is defined once in a program. public
Applet database access - Applet
Applet database access  HI... I'm having an applet where we should display the database values in the applet... It works fine in the local system... but when its in the server, we r getting null values in the local system.. I
How to insert or delete records in MS access database using jsp - JSP-Servlet
How to insert or delete records in MS access database using jsp  Hi friends please provide me a solution that i insert or delete record from a database using java server pages. I used the microsoft access 2003 database. PlZ
JSP and Database access
JSP and Database access  Hi, Please help me with the following program. I am not able to update all the pa column values in my database. csea.jsp: <html> <body> <%@page import="java.sql.*"%> <form method
How to use JTable with MS-Access
How to use JTable with MS-Access   I have Three Column in Database (MS-Access). 1. Name 2. City 3. Contact I want to Display this data in JTable. How can I do it. I also want to EDIT and DELETE this Data
How to use JTable with MS-Access
How to use JTable with MS-Access   I have Three Column in Database (MS-Access). 1. Name 2. City 3. Contact I want to Display this data in JTable. How can I do it. I also want to EDIT and DELETE this Data
Please tell me how I can access a field (data type char) of resultset in a java class
Please tell me how I can access a field (data type char) of resultset in a java class  I have created a table named empdetails in postgreSql 8.4... how i can access
How To Connect MS ACCESS 2003 Database in C Program with Graphics.
How To Connect MS ACCESS 2003 Database in C Program with Graphics.  How To Connect MS ACCESS 2003 Database in C Program with Graphics
Select Employee and display data from access database in a jtable
Select Employee and display data from access database in a jtable  I there Iam a java beginner. I have to create a application where I can select... name of the customer is stored in a access database. Below is how it should
java to MS Access conectivity - Swing AWT
java to MS Access conectivity  give me source code to stored....) that are on the jpanel to the database created in MSACCESS 2007. actually i am... database on the ACCESS.  Hi Friend, Follow these steps: 1. Open
Problem with JRadioButton and Access Database - Java Beginners
in Access Databse, I want to store course type in to database and also other fields...Problem with JRadioButton and Access Database  Hello sir ,Here I have...(); JOptionPane.showMessageDialog(p1,"Data is successfully inserted into database."); con.close
How to store JComboBox selected Item into Ms Access Database - Java Beginners
How to store JComboBox selected Item into Ms Access Database  How to store JComboBox selected Item into Ms Access Database.  Hi Friend...(); } public SwingFrame(){ JFrame f = new JFrame("Frame in Java Swing
access
access   This is Nitha Sriram i am having a problem that, i am having a combo box in the JSP page when i select an item from that i am calling the onchange function. In javascript i am getting the value now i want to pass
How to access the "Add/Remove Programs" list in Control Panel using Java Program? - Java Beginners
Programs list in the Control Panel. I don't know, how can i access it? Kindly give me...How to access the "Add/Remove Programs" list in Control Panel using Java Program?  Dear Sir, I'm very interested in creating java programs
How to save JCombobox Selected Item in to Access Database - Java Beginners
How to save JCombobox Selected Item in to Access Database  How to save JCombobox Selected Item in to Access Database  Hi Friend, Try... =DriverManager.getConnection("jdbc:odbc:access","",""); Statement stmt=con.createStatement(); int i
How to Access MS Access in jar.
How to Access MS Access in jar.  how do i access my Ms-Access file... to access it via Code or is their any alter-native?? Do i need any Driver to do this ... i m able to access a Ms-access via JDBC but cant find the file wen
display data from a table in Access Database in a HTML page
display data from a table in Access Database in a HTML page  how to display data from a table in Access Database in a HTML page in a Java Program
how to delete the access database value in jsp
how to delete the access database value in jsp  i loaded my database data into the dropdown list box...now i want to delete the value..plz send the source code to delete the value in dropdown list box and also from database
how to delete the access database value in jsp
how to delete the access database value in jsp  i loaded my database data into the dropdown list box...now i want to delete the value..plz send the source code to delete the value in dropdown list box and also from database
how to access javascript in mozilla - Java Beginners
how to access javascript in mozilla  i have written javascript code in .js file and i am calling that file in .jsp file as but the script is working in IE but not working in Mozilla. can u plz solve my problem