writing querries qnd connecting for insertion, accessing....

writing querries qnd connecting for insertion, accessing....

i created my front ends using html, and my back end using oracle 10g, i dont know how to connect and where to write querries and how to insert and access the data .. please help me .. thanks

View Answers

December 2, 2010 at 3:27 PM

Hi Friend,

Try the following code:

1)form.html:

<html>
<form method="post" action="http://localhost:8080/examples/jsp/insert.jsp">
<table>
<tr><td>Name:</td><td><input type="text" name="name"></td></tr>
<tr><td>Address:</td><td><input type="text" name="address"></td></tr>
<tr><td></td><td><input type="submit" value="Submit"></td></tr>
</table>
</form>
</html>

2)insert.jsp:

<%@page import="java.sql.*"%>
<%
String name=request.getParameter("name");
String address=request.getParameter("address");
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
           Connection con = DriverManager.getConnection("jdbc:odbc:student");
           Statement st=con.createStatement();
           int i=st.executeUpdate("insert into user(name,address) values('"+name+"','"+address+"')");
           out.println("Data is inserted successfully");
%>

Thanks









Related Tutorials/Questions & Answers:
writing querries qnd connecting for insertion, accessing....
writing querries qnd connecting for insertion, accessing....  i created my front ends using html, and my back end using oracle 10g, i dont know how to connect and where to write querries and how to insert and access the data
accessing data from a json file writing javascript or using jQuery
accessing data from a json file writing javascript or using jQuery  I... correctly accessing the attributes in the json file. Nothing is working. I'm new to javascript using json to create html pages, objects and accessing objects
Advertisements
ModuleNotFoundError: No module named 'tensorflow-qnd'
ModuleNotFoundError: No module named 'tensorflow-qnd'  Hi, My... named 'tensorflow-qnd' How to remove the ModuleNotFoundError: No module named 'tensorflow-qnd' error? Thanks   Hi, In your python
insertion sort
insertion sort  write a program in java using insertion sort
insertion sort
insertion sort  write a program in java using insertion sort
insertion sort
insertion sort  write a program in java using insertion sort
insertion sort
insertion sort  write a program in java using insertion sort
insertion sort
insertion sort  how many arrays needed for insertion sort and why
Insertion into database
Insertion into database  Hi, I need code for inserting the multiple select box values into database.Please do send me the code. Thanks for ur immediate replies its helping a lot
connecting databases
connecting databases  I need to connect mysql on 2 or more remote pc'c. how can i giv the ip address for 2 or more systems. is it possible to connect to the required systems by user specifying the database and table name my
Insertion Sort Applet
Insertion Sort Applet  Please All , I need Insertion sort applet program
Insertion Sort Applet
Insertion Sort Applet  I need Insertion Sort Applet code was design by Dr. Daniel Liang Please
insertion sort applet code
insertion sort applet code  i need Insertion Sort Applet Program
connecting to timesten in web application
connecting to timesten in web application  Please give me the steps connecting to timesten in web application. Am using jsp
Insertion Sort Timer
Insertion Sort Timer  Welcome all I wanna program in java find the timer of insertion sort and find time complexity for random value thanks all
Connecting to a database through the Proxy.
Connecting to a database through the Proxy.  Connecting to a database through the Proxy I want to connect to remote database using a program that is running in the local network behind the proxy. Is that possible
File insertion into oracle database
File insertion into oracle database  How to Read and Insert a file (any format) into a Oracle database
java connecting frames
java connecting frames  how to connect one frame to another frame by using awt or swings?`print("code sample
hibernate insertion problem - Hibernate
hibernate insertion problem  Hi , Thanks for the material .Its very gud . when i run FirstExample.java i get the message insertion has been done int the table contact . but whne i look into database data is not inserted
connecting with database - Struts
connecting with database  I am creating an application where when jsp page is displayed, it contains the combo box where data is populated from the database.it has 3 buttons and the functionality for all buttons is different
Java insertion sort question
Java insertion sort question  I've got another program that I need help with. I am trying to write a Java method that accepts an array of strings, and sorts the strings using the insertion sort algorithm. Then I need to write
Accessing your site
Accessing your site  I cant acess your site.I am getting good grip on java through roseindia.kindly help me so that I can acess roseindia
Connecting code of reset password to database
Connecting code of reset password to database  connecting code of reset password to database
insertion in SQL - SQL
insertion in SQL  Hi! Everybody... i have a problem with sql insertion. When i am inserting values through command i.e. insert into employee values(,,,,); here i want to insert ' in employee name column of database
writing characters
writing characters  how to write a group of characters to a string ... i mean for writing single character using charAt in java
Insertion Sort Problem
Insertion Sort Problem  So I have this in a class file. It is supposed to be an insertion sorter: int min, index=0, temp; for(int i=0;i<sorted.length;i++){ min=sorted[i]; for(int j=i+1;j<
Connecting to Hardware - Java Beginners
Connecting to Hardware  I'm currently using netbean for my Final Year Project system that involve some hardware like electronic weighihng scale. Can you please provide me at least the idea if not the coding on how the system can
connecting to database - Struts
connecting to database  Hi I am having problems with connection to MS SQL Server 2005 database. My first is what do i write in struts-configuration.xml file that enable me to use methods in the model class to display
accessing xml using java
accessing xml using java  I need to retrieve some elements in xml file using java   Hi Friend, Please visit the following links:ADS_TO_REPLACE_1 http://www.roseindia.net/xml/Listingnode.shtml http://www.roseindia.net
Accessing webcam in jsp
Accessing webcam in jsp  Hi Friends, I have to access the webcam through jsp and display the snap in same jsp taken after a click. I am using java media framework but i am not able to detect the device using CaptureDeviceManager
Accessing Web-cam
Accessing Web-cam  I am giving options to upload a photo to the user.. options are: 1st) upload a photo from ur hard drive. 2nd) upload a photo from web-cam. Then how to implement 2nd option using jsp ....can any one
Insertion Sort - Java Beginners
Insertion Sort  Hello rose india java experts.If you don't mind.Can you help me.What is the code for Insertion Sort and Selection Sort that displays LETTERS in alphabetical order from A to Z. Thank you.Hope you gonna helpme
Connecting to MYSQL Database in Java
Connecting to MYSQL Database in Java  I've tried executing the code below but the error that I get is "Error: com.mysql.jdbc.Driver" I downloaded the connection driver and configured the class path but the error persists. Please
javascript variable value insertion in DB
javascript variable value insertion in DB  how can I insert javascript variable value into database using php
Connecting JTable to database - JDBC
Connecting JTable to database  Hi.. I am doing a project on Project Management System for which i created the user interfaces.. I have a user interface in which i have used JTables.. Now my problem is I dont know how to how
java connecting to oracle db
java connecting to oracle db  PLZ SAY ME HOW TO INSERT THE VALUES INTO ORACLE THIS IS THE CODE: import java.io.*; import java.sql.*; import java.awt.*; import javax.swing.*; import java.awt.event.*; import
insertion error - JSP-Servlet
insertion error  my first jsp page : In this i m getting all the values through a method called getAllDetails,the values are getting inserted but the problem is i have created frames , when i clicking on the link book halls
insertion in SQL - SQL
insertion in SQL  Query is "insert into employee values('"+eno+"','"+ename+"');" in the ename place we will get employee names such as John's Peter,Peter's Johnson etc.... i am not able to insert this kind of names
connecting to access database
connecting to access database  print("code sample");Hi I Write java projrame in notepad,I use 3 notepad pages to write this program,when i run this there is no error but my data is not going to my Acess Database. There is working
Accessing Database using EJB
Accessing Database using EJB       This is a simple EJB Application that access the database. Just go through the EJB example given below to find out the steps involved in accessing
dynamic delete and insertion in tables
dynamic delete and insertion in tables  hey... i have a problem..I am working on a problem management system..my code for a particular jsp page is as follows in this page i want to show the admin the already present records
Connecting Oracle database with struts - Struts
Connecting Oracle database with struts  Can anyone please provide me some solutions on Connection between Oracle database and struts
dynamic delete and insertion in tables
dynamic delete and insertion in tables  hey... i have a problem..I am working on a problem management system..my code for a particular jsp page is as follows in this page i want to show the admin the already present records
data insertion and fetch 1
data insertion and fetch 1  @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ <%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type
Ghost Writing
Ghost Writing Ghost Writing is the kind of writing when someone... of writing it. So ghostwriter is a person who works behind the scene on a writing project in return of certain amount. The write-ups of the writer
Connecting to Unix through Java - JavaMail
Connecting to Unix through Java  Could you please tell a sample code, where i connect to the unix server and run a script and write the results in a file and mail that file back to me
Blog Writing
Blog Writing A blog, the short form of web log is an online user... on that. But the professionals are a better choice for writing the blog for commercial or promotional purpose. We provides the services of writing blogs for the commercial
Connecting jboss with sql 2005 - Struts
Connecting jboss with sql 2005  Hai, i have project that was developed in struts,backed is sqlserver 2005 and and i am using jboss. I want to connect another database (sqlserver 2005) with my project.could u please help me
Problems connecting to a database. Java/SQLite
Problems connecting to a database. Java/SQLite  `print("try { con = DriverManager.getConnection("jdbc:sqlite:db/Freepark.sqlite"); } catch... on an SQL database but i am having problems connecting to it, I think the problem
PROBLEM IN ACCESSING JSTL - JSP-Servlet
PROBLEM IN ACCESSING JSTL   hii i m vikram ... i am using jsp application with tomcat 4.1 .and i want to use JSTL in my jsp page ...so how can i use JSTL in my page .. and i install jakaerta-taglibs-standard-1.1.2 in directory

Ads