
How to insert the values from jsp to access ?

Here is a jsp code that insert the values to MS access database.
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 server and run your jsp code.
<%@page import="java.sql.*"%>
<%
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection("jdbc:odbc:student","","");
Statement st=con.createStatement();
int i=st.executeUpdate("insert into data(name,address) values('Roseindia','Delhi')");
out.println("Data is inserted successfully");
%>
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.