fetch data from ms acces

fetch data from ms acces

How do i fetch back AUTO generated key from MS ACCESS table after inserting data through the java panel....
Please Help
Thanks in adv.
View Answers

July 24, 2010 at 2:18 PM

Hi Friend,

Try the following code:

import java.sql.*;
class Select {
public static void main(String[] args){
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection("jdbc:odbc:access");
Statement st=con.createStatement();
ResultSet rs=st.executeQuery("select * from data ");
while(rs.next()){
System.out.println(rs.getInt("id")+" "+rs.getString("name")+" "+rs.getString("address"));
}
}
catch(Exception e){}

}
}

Thanks









Related Tutorials/Questions & Answers:
fetch data from ms acces - Swing AWT
fetch data from ms acces  How do i fetch back AUTO generated key from MS ACCESS table after inserting data through the java panel.... Please Help...(); ResultSet rs=st.executeQuery("select * from data "); while(rs.next
to fetch data from ms word and storing into database
to fetch data from ms word and storing into database  i want to know how to fetch datafields from ms word and storing into database??? please answer soon .its urgent
Advertisements
show null point Exception """ while trying 2 load a JComboBox"" data is fetch from database ms-access
show null point Exception """ while trying 2 load a JComboBox"" data is fetch from database ms-access  import javax.swing.*; import java.awt....,"connected to database"); stat=con.createStatement(); String ss="select name from data
show null point Exception """ while trying 2 load a JComboBox"" data is fetch from database ms-access
show null point Exception """ while trying 2 load a JComboBox"" data is fetch from database ms-access  import javax.swing.*; import java.awt....,"connected to database"); stat=con.createStatement(); String ss="select name from data
show null point Exception """ while trying 2 load a JComboBox"" data is fetch from database ms-access
show null point Exception """ while trying 2 load a JComboBox"" data is fetch from database ms-access  import javax.swing.*; import java.awt....,"connected to database"); stat=con.createStatement(); String ss="select name from data
fetch data from database in javascript
fetch data from database in javascript   How to fetch data from database in JavaScript when it is a leap year
how to fetch data from servlet ????
how to fetch data from servlet ????  how to fetch data from servlet
regarding ms acces database and servlet - JDBC
regarding ms acces database and servlet  hello there, i am trying to do a web application that makes use of a data base. I opted for ms access... = st.executeQuery("Select * from data"); pw.println("Name" + " " + "Address
displaying data from ms excel in form.
displaying data from ms excel in form.  Hi all, I have a requirement as mentioned below: Requirement: I have stored some data in the ms excel... (for example). I need to display these data in a form. along with the actual picture
Function data from web in MS excel
Function data from web in MS excel  Hello, I would like to import data from one webpage to Excel using function Data - From Web. The problem is that this web page has at the end .jsp . When I open it via Excel, click to data
I cant get values in MS acces in tables
I cant get values in MS acces in tables   I got problem in sending values from servlet . * i am using ms acces * i cant display my values but der...; Insert form data into MS database Follow these steps: 1)Go to the start->
Fetch the data from mysql and display it on php form
Fetch the data from mysql and display it on php form  when i press on login button, after succesful login the related data of that person should be display in other textbox
Connect to MS Acces wothout using ODBC but JDBC - JDBC
Connect to MS Acces wothout using ODBC but JDBC  Hi, I want to connect my MS Access using JDBC but not ODBC. Please help me out. Thanks
Data fetch from multiple SQL tables - Hibernate
Data fetch from multiple SQL tables   I am in the process of writing my first hibernate application. I have a sql query that fetches data from... that would use table classes to retrieve data from 8 or 9 tables. Any
Select tag to fetch data from oracle database
Select tag to fetch data from oracle database  I created a select box... of a student and when regnno is selected from the drop down list by a user... oracle database.Similarly when address will be selected by the user from
How to draw to graph in Ms Excel from the data which is sent from an java application....?
How to draw to graph in Ms Excel from the data which is sent from an java application....?  How to draw to graph in Ms Excel from the data which is sent from an java application
ms in data
ms in data  Hi, I am beginner in Data Science and machine learning field. I am searching for the tutorials to learn: ms in data Try to provide me good examples or tutorials links so that I can learn the topic "ms
how to fetch data from mysql database table and draw a bar chart on that data using in jsp
how to fetch data from mysql database table and draw a bar chart on that data using in jsp  how to create bar chart fetch data from mysql database using in jsp.please give me a right code. yhanks in advance
how to make drop down list in JSF & fetch data Item from database
how to make drop down list in JSF & fetch data Item from database  how to make drop down list in JSF & fetch data Item from database
Display the data to MS word
Display the data to MS word  i want help with displaying data on to ms word.When i click the button my web page my servlet should get the data from the database(say im searching using an id) and should display it on the ms word
How To Display both image and data into Swing JTable which is retrieved from ms access database
How To Display both image and data into Swing JTable which is retrieved from ms access database  So far this is my code how can i display both image and data from database.. while (rs.next()) { Vector row = new Vector(columns
Migrating from mysql to MS Access
Migrating from mysql to MS Access  Hi I am hoping for some help I need to write a conversion program (SQL statements) to import existing data in a MYSQL database to a MS Access database. any suggestions would be appreciated
ms data science harvard
ms data science harvard  Hi, I am beginner in Data Science and machine learning field. I am searching for the tutorials to learn: ms data science... the topic "ms data science harvard". Also tell me which is the good
prerequisites for ms in data science
prerequisites for ms in data science  Hi, I am beginner in Data...: prerequisites for ms in data science Try to provide me good examples or tutorials links so that I can learn the topic "prerequisites for ms in data
universities for ms in data science
universities for ms in data science  Hi, I am beginner in Data...: universities for ms in data science Try to provide me good examples or tutorials links so that I can learn the topic "universities for ms in data
ms in data science
ms in data science  Hi, I am beginner in Data Science and machine learning field. I am searching for the tutorials to learn: ms in data science... the topic "ms in data science". Also tell me which is the good training
ms in data analytics
ms in data analytics  Hi, I am beginner in Data Science and machine learning field. I am searching for the tutorials to learn: ms in data... the topic "ms in data analytics". Also tell me which is the good training
ms data science online
ms data science online  Hi, I am beginner in Data Science and machine learning field. I am searching for the tutorials to learn: ms data science... the topic "ms data science online". Also tell me which is the good
harvard ms data science
harvard ms data science  Hi, I am beginner in Data Science and machine learning field. I am searching for the tutorials to learn: harvard ms data... the topic "harvard ms data science". Also tell me which is the good
online ms data analytics
online ms data analytics  Hi, I am beginner in Data Science and machine learning field. I am searching for the tutorials to learn: online ms data... learn the topic "online ms data analytics". Also tell me which
fast ms data science
fast ms data science  Hi, I am beginner in Data Science and machine learning field. I am searching for the tutorials to learn: fast ms data... the topic "fast ms data science". Also tell me which is the good training
ms data science fast
ms data science fast  Hi, I am beginner in Data Science and machine learning field. I am searching for the tutorials to learn: ms data science... the topic "ms data science fast". Also tell me which is the good training
best ms in data science
best ms in data science  Hi, I am beginner in Data Science and machine learning field. I am searching for the tutorials to learn: best ms in data... the topic "best ms in data science". Also tell me which is the good
ms in big data analytics
ms in big data analytics  Hi, I am beginner in Data Science and machine learning field. I am searching for the tutorials to learn: ms in big data... learn the topic "ms in big data analytics". Also tell me which
ms data science ranking
ms data science ranking  Hi, I am beginner in Data Science and machine learning field. I am searching for the tutorials to learn: ms data science... the topic "ms data science ranking". Also tell me which is the good
data science ms programs
data science ms programs  Hi, I am beginner in Data Science and machine learning field. I am searching for the tutorials to learn: data science... learn the topic "data science ms programs". Also tell me which
ms statistics data science
ms statistics data science  Hi, I am beginner in Data Science and machine learning field. I am searching for the tutorials to learn: ms... learn the topic "ms statistics data science". Also tell me which
ms in data science subjects
ms in data science subjects  Hi, I am beginner in Data Science and machine learning field. I am searching for the tutorials to learn: ms in data... can learn the topic "ms in data science subjects". Also tell me which
asu ms in data science
asu ms in data science  Hi, I am beginner in Data Science and machine learning field. I am searching for the tutorials to learn: asu ms in data... the topic "asu ms in data science". Also tell me which is the good
data science ms degree
data science ms degree  Hi, I am beginner in Data Science and machine learning field. I am searching for the tutorials to learn: data science ms... the topic "data science ms degree". Also tell me which is the good
ms in cs data science
ms in cs data science  Hi, I am beginner in Data Science and machine learning field. I am searching for the tutorials to learn: ms in cs data... the topic "ms in cs data science". Also tell me which is the good
ms in data visualization
ms in data visualization  Hi, I am beginner in Data Science and machine learning field. I am searching for the tutorials to learn: ms in data... learn the topic "ms in data visualization". Also tell me which
affordable ms in data science
affordable ms in data science  Hi, I am beginner in Data Science...: affordable ms in data science Try to provide me good examples or tutorials links so that I can learn the topic "affordable ms in data science". Also tell me
ms big data
ms big data  Hi, I am beginner in Data Science and machine learning field. I am searching for the tutorials to learn: ms big data Try to provide me good examples or tutorials links so that I can learn the topic "ms
How to Validate JRadioButton and How to Save data from JRadioButton to MS Access Database - Java Beginners
How to Validate JRadioButton and How to Save data from JRadioButton to MS... JRadioButton I want Store Information from JRadioButton to MS Access Database, and I...(3,g); int i=st.executeUpdate(); JOptionPane.showMessageDialog(null,"Data
com in ms word
com in ms word  how to use com object to fetch data from ms word and storing it into sql database
com in ms word
com in ms word  how to use com object to fetch data from ms word and storing it into sql database
How To Fetch Data From Database Into JTextArea
How To Fetch Data From Database Into JTextArea In this section we will read about how to get the data from database table into JTextArea... an example is being given which will demonstrate you about how to fetch data
best universities for ms in data science
best universities for ms in data science  Hi, I am beginner in Data...: best universities for ms in data science Try to provide me good examples or tutorials links so that I can learn the topic "best universities for ms
top universities for ms in data science
top universities for ms in data science  Hi, I am beginner in Data...: top universities for ms in data science Try to provide me good examples or tutorials links so that I can learn the topic "top universities for ms

Ads