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



Home Answers Viewqa JSP-Servlet insert code jsp to access
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Nilay vora
insert code jsp to access
2 Answer(s)      3 years and 9 months ago
Posted in : JSP-Servlet


insert code jsp to access


Advertisement
View Answers

March 25, 2011 at 12:00 PM


<%@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");
%>


February 2, 2012 at 10:48 PM


<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ page import="java.sql.*" %>
<%@ page import="java.io.*" %>
<%@page import ="javax.servlet.*" %>
<%@page import= "javax.servlet.jsp.*" %>
<%@ page language="java" %>

<%
JspWriter wr = pageContext.getOut();
Connection con=null;
PreparedStatement pst=null;
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con = DriverManager.getConnection("jdbc:odbc:ruhi","system","system");
pst=con.prepareStatement("insert into repository values(?,?,?,?,?)");
File file=new File("C:\\Documents and Settings\\All Users\\Documents\\My Pictures\\Sample Pictures\\Water lilies.jpg");
FileInputStream fis=new FileInputStream(file);
pst.setString(1,"Ship");
pst.setString(2,"Detroit");
pst.setString(3,"yes");
pst.setString(4,"CompleteProduct");
pst.setBinaryStream(5 ,fis, (int)fis.available());
int i = pst.executeUpdate();
if(i!=0){
wr.write("image inserted successfully");
}
else{
wr.write("problem in image insertion");
}
}
catch (Exception e){
System.out.println(e);
}

%>

Last edited b



Related Tutorials/Questions & Answers:
insert code jsp to access
insert code jsp to access   insert code jsp to access
code for insert the value from jsp to access database
code for insert the value from jsp to access database  code for insert the value from jsp to access database
Advertisements
how to insert values from jsp into ms access
how to insert values from jsp into ms access   how to insert values using jsp into ms access database
help in insert code - JSP-Servlet
help in insert code  I have some doubt in following code. I want to insert value using prepared statement.we r accessing connection from other...;insert regiform values('"+firstname+"','"+address+"','"
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
how to access element added via javascript dynamically using jsp code
not able to access these dynamically added textboxes values from my jsp code...how to access element added via javascript dynamically using jsp code ... javascript dynamically using the jsp code. i am adding empty records on .jsp page
Insert a row in 'Mysql' table using JSP Code
Insert a row in 'Mysql' table using JSP Code In this section, we will discuss about how to insert data in Mysql database using JSP code. Query...; Mysql database Table. Code to insert row in Mysql table : databaseinsertion.jsp
jsp to access query
jsp to access query  How to insert the values from jsp to access ?   Here is a jsp code that insert the values to MS access database...) Restart your server and run your jsp code. <%@page import="java.sql.*"%> <
insert query in jsp
insert query in jsp  give me insert code in jsp at run time
code for insert button
code for insert button    i want code for insert button(in image...;The given code uses Swing components to create a image button and allow the user..."); PreparedStatement pstmt = conn.prepareStatement("insert into data(name
insert image - JSP-Servlet
insert image  hi friends i am mahesh i am trying to insert image into oracle database using JSP but i am not geting so please friends send me the code for inserting image into database using JSP   Hi Friend, Try
cannot insert data into ms access database - Java Server Faces Questions
cannot insert data into ms access database   go back... Microsoft Access Driver(*.mdb) 5. Select database name and Create the DSN name (e.g emp) 6. Click "Ok" and then try the JSP. form.jsp: Name: Address
insert code using spring - Spring
insert code using spring  Hi, Can any one send code for inserting the data in database using spring and hibernate .. Many thanks, Raghavendra  Hi Friend, Please visit the following link: http
Insert and Retrieve Image - JSP-Servlet
Insert and Retrieve Image  Hello, I need source code using java servlet or jsp and html form and brief explanations on how to insert and retrieve..., This is insert image code
insert values - JSP-Servlet
insert values  How to insert values in the oracle database using JSP... page<html><head><title>Insert value in database</title><...;100%"> <h1><center>Insert value in Database<
Code to insert date in to database - Development process
Code to insert date in to database  Hi , in my following code i want... getting error . plz send me code Error 500--Internal Server Error java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Too few parameters
MS Access - JSP-Servlet
stepts 1.to configure the ms access database to your system control panel... database for msaccess and then click ok 2.to give the following code "db1...+"'"; ResultSet rs = stmt.executeQuery(query);   Hi friend, Code to help
How To Insert A New Record to MS Access table database in GUI
How To Insert A New Record to MS Access table database in GUI  Hello... that involves inserting a record into a 6-column table in my MS Access database table. I'm... in advance for your help. Below is part of my java code. private class
JSP and Database access
JSP and Database access  Hi, Please help me with the following program. I am not able to update all the pa column values in my database. csea.jsp: <html> <body> <%@page import="java.sql.*"%> <form method
To insert attachment file in database in JSP.
To insert attachment file in database in JSP.  I am doing project in JSP. How to insert attachment file in mysql database? Please suggest some solution. Your inputs is valuable to me.   Hi Friend, Visit Here Thanks
how to insert, retrieve data from,to db(code)....
how to insert, retrieve data from,to db(code)....  Hi..... i ve... db. cn u plz tel me the code in detail.n i thk it shud b written in jdbc.....i ve written sum code,bt gting so many doubts in that....so plzzzz help
how to insert, retrieve data from,to db(code)....
how to insert, retrieve data from,to db(code)....  Hi, i have created login page n in that a registration form also in jsp, my doubt is-when new user... plz tel me the code in detail.n i thk it shud b written in jdbc.....i ve
To insert attachment file in database in JSP.
To insert attachment file in database in JSP.  I am doing project in JSP. How to insert attachment file in mysql database? Please suggest some... code: 1)page.jsp: <HTML> <HEAD><TITLE>Display file upload form
problem in jsp using ms-access
)Your DSN will get created. 6) Restart your server and run your jsp code. Here... will get created. 6) Restart your server and run your jsp code. Here is your...problem in jsp using ms-access  after starting server(tomcat) wen v
problem in insert query - JSP-Servlet
problem in insert query  Hi! I am using this statement for data...:- String insertQuery= "insert into volunteer_profiles ( name, gender ) values ( 'name... problem plz give full details with source code and visit to : http
Insert Blob(Image) in Mysql table using JSP
Insert Blob(Image) in Mysql table using JSP In this Section, we will insert blob data(image) in Mysql database table using JSP code. A Blob stores a binary... Blob(Image) in Mysql table using JSP Download Source Code
java code to insert select at run time....????
java code to insert select at run time....????  java database code to retrieve data at runtime and please give codes for insert delete too.... using jsp and withot jsp   1)application.jsp: <%@ page import="java.sql.
JSP Radio Button MySQL insert - JSP-Servlet
JSP Radio Button MySQL insert  Hi, I have an HTML form which has... with the code to store radio button data and checkbox data to MySQL table. For example in the backend table there is only one column for Gender, how do I insert male
Insert data in mysql database through jsp using prepared statement
; This is detailed jsp code that how to insert data into database by using prepared statement... Insert data in mysql database through jsp using prepared statement...; Save this code as a .jsp file named "prepared_statement_query.jsp"
Remote desktop access - JSP-Servlet
do help me with source code ... i shall be greatfull for the person who shall reply me Thank a lots in advance   I forgot to say i am using jsp
jsp code
jsp code  what are the jsp code for view page in online journal
Advertisements
 

 

 

DMCA.com