Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Swing-AWT fetch data from ms acces
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


raman
fetch data from ms acces
1 Answer(s)      4 years and 2 months ago
Posted in : Swing AWT


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

Advertisement
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
how to fetch data from servlet ????
how to fetch data from servlet ????  how to fetch data from servlet
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
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
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
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
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
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
data insertion and fetch 1
data insertion and fetch 1  @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ <... rs = (ResultSet) request.getAttribute("data"); while...; @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ insert int data base @@@@@@@@@ import
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
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... given which will demonstrate you about how to fetch data and displayed
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
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
how to fetch image from mysql using jsp
how to fetch image from mysql using jsp  how to fetch image from mysql using jsp
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
ResultSet Object data to Ms-Word Doc
ResultSet Object data to Ms-Word Doc   help me , i don't know how to write data from oracle database into MSWord document using servlet or jsp
Fetch the data using jsp standard action
Fetch the data using jsp standard action  I want the code of fetch the data from the database & show in a jsp page using jsp:usebean in MVC model... that retrieves the data from the database through java bean and display it in jsp page
MySql Databse query to fetch results from database
MySql Databse query to fetch results from database  Hi. I have a field in database named stages. its datatype is varchar(60). It contains values chennai,trichy,kanchipuram for a single record. I have to retrieve these data from
Fetch user records from a table in database
Fetch user records from a table in database  Hi. I have a field in database named stages. its datatype is varchar(60). It contains values chennai,trichy,kanchipuram for a single record. I have to retrieve these data from
fetch record from MYsql table query
fetch record from MYsql table query  Hi. I have a field in database named stages. its datatype is varchar(60). It contains values chennai,trichy,kanchipuram for a single record. I have to retrieve these data from the field table
Advertisements
 

 

 

DMCA.com