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



Home Answers Viewqa Java-Beginners JDBC with access as backend
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Naveen Patil
JDBC with access as backend
1 Answer(s)      2 years and a month ago
Posted in : Java Beginners


Jdbc connectivity in java to MS Access for retrieving data between two dates


Advertisement
View Answers

August 9, 2012 at 6:06 PM


Here is an example that fetches data between two dates from MS access database.

import java.sql.*;

class FetchDataBetweenTwoDates 
{
    public static void main(String[] args) 
    {
        try{
        Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
        Connection con = DriverManager.getConnection("jdbc:odbc:roseindia");
        Statement st=con.createStatement();
        String d1 = "2/22/2006";
        String d2 = "3/20/2007";
        String query = "Select * from employee where dateOfJoining >=to_date(d1,'dd/mm/yyyy') and dateOfJoining <=to_date(d2,'mm/dd/yyyy')"; 
        ResultSet rs=st.executeQuery(query);
        while(rs.next()){
            System.out.println(rs.getString("name")+"\t "+rs.getString("address"));
        }
        }
        catch(Exception e){
        System.out.println(e);
        e.printStackTrace();
        }
    }
}


Related Tutorials/Questions & Answers:
JDBC with access as backend
JDBC with access as backend  Jdbc connectivity in java to MS Access... data between two dates from MS access database. import java.sql.*; class... con = DriverManager.getConnection("jdbc:odbc:roseindia"); Statement st
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
Advertisements
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
Jdbc MS-Access question
Jdbc MS-Access question  How to delete records from the three table in MS-Access? They are in relationship with each other regarding to data field
Jdbc MS-Access question
Jdbc MS-Access question  How to delete records from the three table in MS-Access? They are in relationship with each other regarding to data field
java &ms access - JDBC
for a food festival using Java swing as front end and MS access as Backend... = DriverManager.getConnection("jdbc:odbc:access"); Statement st... =DriverManager.getConnection("jdbc:odbc:access","",""); Statement stmt=con.createStatement
MS Access - JDBC
information about MS access database...but still i am having doubt in that topic. My problem is : Is there any jar to connect MS Access and java ... because... to be remember 1.to configure the ms access database to your system control
Access Infotech, Hyderabad - JDBC
Access Infotech, Hyderabad  Hello friends Access Infotech is the fast growing company in hyderabad
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
MS ACCESS - JDBC
MS ACCESS  java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'origin='src' destination='dest''. THAT MY PROBLEM
MS Access` - JDBC
MS Access`  Hello Sir, Thank you very much for your valuable information. Actually i am doin a project to generate Hall tickets.So, I need to insert image into MS Access Database. Now the task is how to retrieve the image
Use JDBC to connect Microsoft Access
Use JDBC to connect Microsoft Access  How to use JDBC to connect Microsoft Access
audio files in jdbc connectivity with ms-access - JDBC
to retrieve audio files through jdbc connectivity with ms-access and how to play... static void main(String[] args) { try{ String url="jdbc:odbc:access"; File... = DriverManager.getConnection("jdbc:odbc:access"); PreparedStatement ps
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
jdbc warning regarding to ms access
jdbc warning regarding to ms access  shows warning msg while compiling using ms access : warning: sun.jdbc.odbc.JdbcOdbcDriver is Sun proprietary API...=DriverManager.getConnection("jdbc:odbc:accdsn","",""); try{ Statement stmt
BACKEND - JSP-Interview Questions
BACKEND  Is oracle or mysql as database makes the difference in jsp programming? I mean, I want to know whether the jsp with my Sql backend can also run with oracle without making any changes in the jsp programming? Thanks
JDBC access database
JDBC access database       JDBC is a Java Database Connectivity. The JDBC Connectivity provides API classes... that helps in understanding JDBC access database. The code illustrates the list
Access Excel file through JDBC
Access Excel file through JDBC In this section, you will learn how to access excel file through Jdbc and display records in JTable. As you know Excel comes with an ODBC driver, so we are using JDBC-ODBC bridge driver to connect jdbc
JDBC Execute Update Example
JDBC Execute Update Example       JDBC... the number of rows affected in the backend of  database.The code illustrates a simple example from JDBC Execute update Example. In this Tutorial we want
JDBC batch
to interact your Java Application in your front end with the backend. The backend can be SQL-2000,2005,MySql. A batch in JDBC is a set of sql statement ... JDBC batch       JDBC is simply a Java
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
Need Help To Connect XML as backend in Java-Swing
Need Help To Connect XML as backend in Java-Swing  Seat arrangment swing screenshot I made XML program to connect to swing like this. <?xml version="1.0" encoding="iso-8859-1"?> <BUISNESS-CLASS> <PERSON>
online quiz program coding using jsp, jdbc odbc connection with ms. access.. Thank you.
online quiz program coding using jsp, jdbc odbc connection with ms. access.. Thank you.  please provide online quiz program coding using jsp, jdbc odbc connection with ms. access.. Thank you.   Create table test
how to store image file and videofile in ms access database using java? - JDBC
how to store image file and videofile in ms access database using java?  how to store image file and video file in ms access database using java
JDBC
JDBC       JDBC stands for Java Data Base Connectivity that defines how a client may access a database... Connectivity (JDBC) API is the industry standard for database-independent
Access Specifiers and Access Modifiers
Access Specifiers and Access Modifiers  What are Access Specifiers and Access Modifiers
How to Access MS Access in jar.
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...How to Access MS Access in jar.  how do i access my Ms-Access file
access specifiers and access modifiers
access specifiers and access modifiers  I want a powerpoint presentation for access specifiers and access modifiers. Please send me the same and soon
jdbc
jdbc  how to update int values of ms-access in jdbc program?   In MS Access database, use Number data type for int values. import... =DriverManager.getConnection("jdbc:odbc:access","",""); Statement st=null; st
jdbc
of ms-access using java application i want to perform both operations of ms-access using jdbc connection   import java.sql.*; public class CreateTable... = DriverManager.getConnection("jdbc:odbc:student"); Class.forName
jdbc
how i can access Microsoft Access database by java program  how i can access Microsoft Access database by java program ? if any package or jar file... connectivity in short   Java MS Access database connectivity
Advertisements
 

 

 

DMCA.com