Update Database from jsp
I want to update my oracle database column from a text box ,so whenever I input some text value in the text
box and click UPDATE button the database field should be updated . I have a drop down menu also ,so when ever I select the drop down and enter in the text box that field should be updated.
I have written the code but its not working . Please help me out its Urgent.
<%@ page language="java" import="java.sql.*" %>
<%@ page import = "java.io.*"%>
<%
String id = request.getParameter("ID");
int num=Integer.parseInt(id);
String url= request.getParameter("URL");
%>
<%
try{
Connection conn = null;
Class.forName("oracle.jdbc.OracleDriver");
conn = DriverManager.getConnection("jdbc:oracle:thin:SCOTT/[email protected]_1:1521:orcl");
Statement st= null;
st=conn.createStatement();
st.executeUpdate("UPDATE TEST_LINKS SET URL= '"+url+"'WHERE ID= '"+num+"' ");
}
catch(Exception e){
System.out.println(e);
}
%>
View Answers
Ads
Related Tutorials/Questions & Answers:
Update Database from jsp
Update Database from jsp I want to
update my oracle
database column
from a text box ,so whenever I input some text value in the text
box and click
UPDATE button the
database field should be updated . I have a drop down menu
Advertisements
Dynamically Update textbox from database
Dynamically
Update textbox
from database I have a
database as shown below.(
database created using SQL Server 2005)
name : george,simon
address... to that typed value
from database has to be displayed in another text box
How to access the database from JSP?
How to access the
database from JSP? Hi,
What is the process of accessing the
database from JSP page?
Thanks
Hi,
In the
JSP program...
database from JSP which explains you how to access the
database by embedding
display date to jsp from database
display date to
jsp from database display date to
jsp from database to calender
if the start date and end date is available than calender date... not available in
database field than show in green color and clickable.
NOTE :- Date
How to retrieve blob image from database in JSP?
How to retrieve blob image
from database in
JSP? Hello,
JSP is used... the blog image
from database.
How to retrieve blob image
from database in
JSP?
Hi,
Please check the tutorial Retrieve image
from database using
How to store and retrieve image from database in JSP?
How to store and retrieve image
from database in
JSP? Hi,
In one... and retrieve image
from database in
JSP?
Thanks
HI,
You can use... the image. Check this example:
Retrieve image
from database using Servlet.
Thanks
How to update,Delete database values from jtable cells ..
How to
update,Delete
database values
from jtable cells .. hello Sir...
from database into jtable of a jpanel.. Now Sir, According to my need i have to
update the cell values
from there only means that whatever values i ma entering
data retrival from database throw simple jsp..
data retrival
from database throw simple
jsp.. We can retrieve the the data
from data base simple
jsp page:
Jsp Page:retrive.jsp
<...;
Statement stmt = null;
String Query="SELECT *
FROM STUD";
try
online database connectivity issue from JSP page .
online
database connectivity issue
from JSP page . Hi;
Everything working fine in localhost , but facing a simple problem in connectivity with
database from my web site.
In my local host-- when I am typing
online database connectivity issue from JSP page .
online
database connectivity issue
from JSP page . Hi;
Everything working fine in localhost , but facing a simple problem in
connectivity with
database from my web site. In my local host-- when I am typing following code
online database connectivity issue from JSP page .
online
database connectivity issue
from JSP page . Hi;
Everything working fine in localhost , but facing a simple problem in
connectivity with
database from my web site. In my local host-- when I am typing following code
Display Data from Database in JSP
, to show data
from the
database
click on the link that calls another .
jsp file named...;body>
<h2>Data
from the table 'stu_info' of
database 'student'</h2..._to_
database_query.jsp. Click on the link given in the
first
jsp page,that calls
how to get data from database into dropdownlist in jsp
tutorial go through the link
JSP Get Data Into Dropdown list
From Database
 ...how to get data
from database into dropdownlist in jsp Can anybody... the
database and set it into dropdown list in
jsp
please help
<br/>
Fetching database field from servlet to jsp page ?
Fetching
database field
from servlet to
jsp page ? Hello Java... field.
I wanted to pass some of the
database field
from servlet to
jsp...
(i am opening my
database in servlet init() method )
how to pass rs.getString(8
JSP to add details to a database from a HTML form.
JSP to add details to a
database from a HTML form. Hi
I'm a second year CS student who has to use
JSP to validate a HTML form and add the details entered into a
database. The files are all in one folder for use in tomcat
How to show data from database in textbox in jsp
How to show data
from database in textbox in
jsp How to show data
from database in textbox in
jsp
Here is an example that retrieve the particular record
from the
database and display it in textbox using
JSP.
<
displaying data retrieved from a database in a jsp page
displaying data retrieved
from a
database in a
jsp page the page should display username, emailid, telephone in addition to tthe tagline however... sql = "select billid, customerid, billdate, status
from customerbills where