Home Answers Viewqa JDBC regarding ms acces database and servlet

 
 


aravind
regarding ms acces database and servlet
1 Answer(s)      4 years ago
Posted in : JDBC

View Answers

May 26, 2009 at 10:41 AM


Hi Friend,

It seems that you haven't set up DSN connection.

You can use the following steps for creating DSN connection:

1. Open Data Sources (Start->Control Panel->Administrative Tool->Data Sources(ODBC)

2. Open User DSN tab
3. Add a user DSN
4. Select Microsoft Access Driver(*.mdb)
5. Select database name and Create the DSN name (e.g emp)
6. Click "Ok" and then try the following Servlet code where 'access' is our DSN:

import java.io.*;
import java.sql.*;
import javax.servlet.*;
import javax.servlet.http.*;

public class NewServlet extends HttpServlet{
public void doGet(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException{
response.setContentType("text/html");
PrintWriter pw = response.getWriter();
Connection connection=null;
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
connection = DriverManager.getConnection("jdbc:odbc:access");
Statement st = connection.createStatement();
ResultSet rs = st.executeQuery("Select * from data");
pw.println("Name" + " " + "Address" + "<br>");
while(rs.next()){
pw.println(rs.getString(1) + " " + rs.getString(2) + "<br>");
}
}
catch (Exception e){
pw.println(e);
}
}
}

Thanks









Related Pages:
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 database, i could run java main programs(i e not servlets public static void main
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->
MS Access - JSP-Servlet
MS Access  hello sir, i want to use MS.Access as my database..so my problem is how to connect MS Acces database with servlets ... thank you... stepts 1.to configure the ms access database to your system control panel
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... visit JDBC-ODBC Bridge and download the driver for your database. b) Use
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
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 Thanks in adv.  Hi Friend, Try the following code: import
to get picture from ms access database by jsp-servlet....
to get picture from ms access database by jsp-servlet....  I have inserted a picture in ms access data base,,,how we can retrieve that picture by using jsp
MS ACCESS
MS ACCESS  i have done : Insert form data into MS database...) Restart your server and run your jsp/servlet code and created a table... java.sql.DriverManager; import java.sql.Statement; /** * Servlet
MS ACCESS
MS ACCESS  i have done : Insert form data into MS database Follow...) Restart your server and run your jsp/servlet code and created a table... java.sql.DriverManager; import java.sql.Statement; /** * Servlet implementation
MS ACCESS
MS ACCESS  i have done : Insert form data into MS database...) Restart your server and run your jsp/servlet code and created a table... java.sql.DriverManager; import java.sql.Statement; /** * Servlet
regarding bill generation - JSP-Servlet
regarding bill generation  in this program it is connected with database in mysql.when a customer or user enters he can able to see his payable amount as well as what he paid before as bill
How to Open Picture From M.S. Access Database using Java Servlet ?
How to Open Picture From M.S. Access Database using Java Servlet ?  Hi all my Friends I have below code which insert a picture into M.S. Access Database But i m still not able to open this picture through Java using M.S. Access
Updating Ms Access Database using jsp - JSP-Servlet
Updating Ms Access Database using jsp  Hi I am new to jsp and I am trying to update a record in an access database. I only want to update part of the record because the other columns already have data. When I use Update
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
regarding java - JDBC
will be directly saved in the database i have seen many examples regarding this concept on java with ms access on the site www.planetsourcecode.com can you...regarding java  i am making a project on supply chain system i have
accessing ms access through jsp
accessing ms access through jsp  i have 3 tables in my database employee,project,task if i put employee id the search field .i should get details from other table what all queries should i use in servlet file and i am using
link hibernate to MS ACCESS database
link hibernate to MS ACCESS database  how to link hibernate to ms access database instead of sql database
Regarding Database Creation
Regarding Database Creation  How to use the hibernatetutorial database for running the first application. Is it enough to just create the database on the local host or do we need to create the tables in the database. If i need
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
regarding web.xml - JSP-Servlet
regarding web.xml  I am the java beginner, please send the web.xml code and how to run a servlet for apache5.0.... my problem is in tomcat manager am..., jsp and servlet tutorials for beginners at http://www.roseindia.net/quickguide
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
ms sqlserver
ms sqlserver  hii, i m getting trouble in restoring a database file in MS SQLServer 2000 . all i have is signature.bkp , query.sql, signaturebackup.bkp files... please guide me how i restore these backup files in new database
Regarding servlet - Servlet Interview Questions
Regarding servlet  i want to ask question regarding Servlet i have created one servlet in that i have set the one integer value in the context,noe...,by running this servlet i m getting the context value ,now i have made another
Regarding Hibernate
Regarding Hibernate  Both JDBC and Hibernate are used to connect to database then whats the need of going to hibernate? What are the main differences? And could you let me know please
regarding JSP - JSP-Servlet
regarding JSP  Hi, This is Malleswari from Satyam. I'm facing a problem while running the JSP tags...like if i want to write or any other, the tag is not supported in my page. In prefix i mentioned "c". still i didnt get
regarding jdbc - JDBC
regarding jdbc  how i can configure java with ms access
ms access
ms access  hey ,thanks for my question i have one question: now... has to login . i already created ms access page and inserted values throught servlet and register.jsp now i need code for reading values from "username
ms access
ms access  hey ,thanks for my question i have one question: now... has to login . i already created ms access page and inserted values throught servlet and register.jsp now i need code for reading values from "username
ms access
ms access  hey ,thanks for my question i have one question: now... has to login . i already created ms access page and inserted values throught servlet and register.jsp now i need code for reading values from "username
ms access
ms access  hey ,thanks for my question i have one question: now... has to login . i already created ms access page and inserted values throught servlet and register.jsp now i need code for reading values from "username
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
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
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
Regarding a project in java - JSP-Servlet
Regarding a project in java  am doing a project on Tiny ETL(Extract Transform and Load), using jsp-servlets. Can u help me out by giving some... friend, Plz specify the technologies you have used like JSP/Servlet/Struts/J2EE
odbc MS EXCEL
odbc MS EXCEL  hey my whole database is stored in MS Excel. so please tell me that can we connect to that database. if yes, how to do that. please help me out i am doing it in netbeans can please tell me the steps
regarding mini project - JDBC
regarding mini project  i need to make a mini project using servlet and jdbc.pls help me with a real time application
MS Access` - IDE Questions
MS Access`  hello sir, how to configure MS Access database in Net Beans5.5... and i have a doubt, where should we run the below code...either in IDE or in any editor like EDITPLUS. waitin for your reply.... thank you
J2ME connectivity to ms access
J2ME connectivity to ms access  How to establish client server connectivity to access ms access database on the server side? I have made the odbc connection. Plz help me in the coding part.. Dont know how to start
MS Access` - JDBC
to insert image into MS Access Database. Now the task is how to retrieve the image from database. And i am developing a JFrame to retrieve tha fields from database...MS Access`  Hello Sir, Thank you very much for your valuable
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
server database connection - JSP-Servlet
, which database you want to use Oracle or MS Access? Thanks...server database connection  sir generally we will connect to the database by using the following steps 1.Class.forName("sun.jdbc.odbc.JdbcOdbcDriver
how to connect to MS access database in JSP?
how to connect to MS access database in JSP?  how to connect to MS access database in JSP? Any seetings/drivers need to be set or installed before it? Please tell what needs to be done after creating a table with an example
how to acces file in c - WebSevices
how to acces file in c  How to acces file in c.... I have doubt on visual c++ ... how to create dialog control in visual c
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
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...); }catch(SQLException ex) { System.err.println("database connection
jsp and servlet
,and have a connectivity with thwe oracle database,and login form will have submit button,edit button and delete button,through which we can acces the data edit the data and delete the data,using jsp and servlet
MS Access - JDBC
MS Access  hello Mr.Kaleeswaran, thank you very much for giving information about MS access database...but still i am having doubt in that topic... to be remember 1.to configure the ms access database to your system control
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

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.