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



Home Answers Viewqa Java-Beginners Searching with alphabetical order

Have Programming Question? Ask it here!
 
 
 


Ragini Shukla
Searching with alphabetical order
2 Answer(s)      6 years ago
Posted in : Java Beginners



Advertisement
View Answers

August 11, 2008 at 3:28 PM


i think question is not much clear..
are the 2 buttons search and delete?

If so...
then the jsp page should be like
<%@ page import="java.sql.*" %>
<%! Connection con;
ResultSet rst;
Statement st;
String url="jdbc:db2://url/db:";

%>
<%
try
{
Class.forName("com.ibm.db2.jcc.DB2Driver");
con=DriverManager.getConnection(url,"user","pwd");
System.out.println("After Establishing connection");
}
catch(ClassNotFoundException e)
{
System.out.println("ERROR!1: "+e);

}
%>
<table>
<tr><td>NAME</td></tr>


<%
try
{

st=con.createStatement();
rst=st.executeQuery("select * from table where name='"+request.getAttribute("name")+"' order by name");
System.out.println("After select");
while(rst.next())
{System.out.println("inside while");%>

<tr><td> <%= rst.getString(2) %><br></td></tr>


<%} }

System.out.println("After reading values");

}

catch(Exception e)
{
System.out.println("ERROR!!2 :"+e);

}





%>






This is for displaying name in a jsp page....
similarly u can use the query delete * from table where name='"+request.getParameter("name")+"'"






i think this qould help u.......
Thanks and regards
prashu


August 11, 2008 at 3:30 PM


hai.........
aftr that please use
closing tags for table...

thanks and regards
prashu


Related Tutorials/Questions & Answers:
Searching with alphabetical order - Java Beginners
Searching with alphabetical order  Hi, I want to this please help me Steps:- 1:-I have a one form of name text box with two button. 2:-user input in name text box(alphabetical order)search all fields from
Searching with alphabetical order - Java Beginners
. 2:-User input in the name text box(searching alphabetical order) name...Searching with alphabetical order  Hi, please understood my problem and send write code its very urgent I a write once again. Steps
Advertisements
Alphabetical order - Java Beginners
clicked the view button Now i want to display the files in alphabetical order...Alphabetical order  Hi.. I've a swings application about adding a record into a file and displaying it in text area. It contains the fields... ID
Alphabetical order - Java Beginners
in alphabetical order of ID. How can i implement this... Pls Help..:) Thanks...Alphabetical order  Hi.. I've a swings application about adding a record into a file and displaying it in text area. It contains the fields... ID
Reverse word of string in alphabetical order
Reverse word of string in alphabetical order  wap a program that reverse word of string in alphabetical order. e.g. input by user The purpose of education is to replace an empty mind with an open one output
How to index a given paragraph in alphabetical order
How to index a given paragraph in alphabetical order  Write a java program to index a given paragraph. Paragraph should be obtained during runtime. The output should be the list of all the available indices. For example: Input
Arrange the sentences in alphabetical order of words Java
Arrange the sentences in alphabetical order of words In Java Program... the sentences in alphabetical order of words. Here is the code for sorting Sentence in Alphabetical order: import java.util.*; import java.util.regex.
order
order   write a java code to enter order of number of chocolates(bar,powder,giftbox) in arraylist. Also consider exceptional cases like entering integer in name use try,catch ,throw to deal with exception
searching books
searching books  how to write a code for searching books in a library through jsp
searching technique
searching technique  Hi, i need any searching technique in java to search the data and give the all possible data by links
searching problem
searching problem  how we can make a code in core java for searching in hard disk? i have to make an antivirus as my minor project , so i have need this type code to search the virus in hard disk
searching problem
searching problem  how we can make a code in core java for searching in hard disk? i have to make an antivirus as my minor project , so i have need this type code to search the virus in hard disk
file searching
file searching  i need a prog for searching inside a text file after evry 1 min to find does it hav any new entry
Read a string and reverse it and then print in alphabetical order.
Read a string and reverse it and then print in alphabetical order... String reverse(String str) method and set in alphabetical order by String... in alphabetical order. ReverseAlphabetical.java  
searching string
searching string   how to write a program for searching a string   Hi Friend, Try this: import java.util.*; class SearchString{ public static void main(String[] args){ Scanner input=new Scanner(System.in
searching the data
searching the data  respected sir , i am making the desktop application , so how can i search the data which are stored in the mysql databses through click the button and display in jtable through netbeans dynamically
Searching - Hibernate
'Sandeep' order by record.userid"; Query query = session.createQuery(SQL
searching inside a file for details
searching inside a file for details  i created a file with name,country,state etc...when i'm searching for the name, i have to get other details like country,state etc...please do help
Searching for Code - JSP-Servlet
JSP, Servlet Searching for Code  Hi, i am looking for a jsp servlet code examples for the search function in my application.Thanks
searching from database
searching from database  how to search data from data base throug search...such as contact no./lastname /firstname should give whole information from database...   Please visit the following link: Servlet search
HQL order by.
HQL order by.  HQL Order by query giving problem.   Order... mention, order by automatically sorted the list in ascending order. Here is an example of order by clause. Since we didn?t mention ?asce? or ?desc? it will return
Searching an element - JSP-Servlet
Searching an element  Dear sir, sir i have an employee table... doing a searching an element by empId and displaying a all the employee table... for searching an element by the empId.and one submit button for submitting this form.And
Searching an element - JSP-Servlet
Searching an element  Dear sir, sir i have an employee... in that i am doing a searching an element by empId and displaying a all... field for searching an element by the empId.and one submit button for submitting
SQL ORDER BY
SQL ORDER BY       The ORDER BY keyword sort the table result set by a specified column. You want to sort the records in ascending order,  you can use the ASC keyword
Java String searching.
Java String searching.  How to search a string in given String array?   import java.util.Scanner; public class StringSearch { public... and for searching we used userCity.equalsIgnoreCase(city[i
Java Sorting and Searching
Java Sorting and Searching   If anyone could help me with this I would be really thankful! Write a program that stores the names of these artists in a String array. The program should prompt the user to enter the name
Searching operation in JAva
Searching operation in JAva  Sir, I have made a project for the Dispatch section of my office. I have to search for letters that are dispatched on a particular date. Now there are thousands of letters dispatched on a particular
Searching operation in JAva
Searching operation in JAva  Sir, I have made a project for the Dispatch section of my office. I have to search for letters that are dispatched on a particular date. Now there are thousands of letters dispatched on a particular
Searching operation in JAva
Searching operation in JAva  Sir, I have made a project for the Dispatch section of my office. I have to search for letters that are dispatched on a particular date. Now there are thousands of letters dispatched on a particular
Searching English words in a string
Searching English words in a string  My task is to find English words and separate them from a string with concatenated words..for example AhdgdjHOWAREgshshYOUshdhfh I need to find if there exists any English words.   
Searching operation in JAva
Searching operation in JAva  Sir, I have made a project for the Dispatch section of my office. I have to search for letters that are dispatched on a particular date. Now there are thousands of letters dispatched on a particular
Ascending order
of them equal to each other, in any order, (for example, 23, 7, 156; but not 23, 7, 23), and then it should print out the three integers in ascending order, saying
searching for strings in a file
searching for strings in a file  how can i search of a person and display the other details associated with the name using java gui window?   import java.util.ArrayList; import javax.swing.*; import java.awt.event.
Finding searching phrase of a search engine
Finding searching phrase of a search engine  how to find out searching phrase of a search engine..? like, if visitors enter the keyword to google, is is any possible to get that keyword
Insertion, sorting and searching in array
; } Insertion, sorting and searching in array   ... to perform searching and sorting in array. In the java code given below we have... in ascending order. Arrays.sort(array); show("\nArray elements
MySQL Order By
MySQL Order By       Here, you will learn how to use MySQL Order By clause. The Order By clause is used for sorting the data either ascending or descending order according to user
Order Entry System
Order Entry System  Create a new order entry system using netbeans and microsoft access.can anyone help me
Maven's order of inheritance
Maven's order of inheritance  hello, What is Maven's order of inheritance?   hii, 1.parent pom 2.project pom 3.settings 4.CLI parameters
SQL Union with order by
SQL Union with order by  I want to combine three queries using union. 1.SELECT * from user_projects where status='O' order by id desc It returns... userprojects where status!='F' and status!='D' and status!='O' and newproject='yes' order
PHP SQL ORDER BY
PHP SQL ORDER BY       This example illustrates how to execute query with ORDER BY clause in the php application. ORDER BY clause is used to sort the result data either
ascending order of a data hierarchy
ascending order of a data hierarchy  The ascending order of a data hierarchy is 1. Bit-byte-record-field-file-database 2. Byte-bit-field-record-file-database 3. Byte-bit-record-file-field-database 4. Bit-byte-field-record-file
Alphabetically sorting order
sorted order   Hi Friend, Try the following code: import...(st); } System.out.println("ArrayList Elements in Sorted order
Searching For Important Issues for Writing Articles
Searching For Important Issues for Writing Articles       People all over the world like to read... issues out of scrap. Whenever you are searching for a key issue, analyze the industry
Searching a word file on server in JSP - JSP-Servlet
Searching a word file on server in JSP  Seacrhing a word file on server side using JSP. I am Apache Tomcat Server. Please help me Sir
searching a text string in file - Java Beginners
searching a text string in file  code to match a string in a file that is already mentioned in java code.if the string matches any part of a string that whole string is printed
SQL ORDER BY
SQL ORDER BY       The ORDER BY keyword sort the table result set by a specified column. You want to sort the records in ascending order,  you can use the ASC keyword
Reverse Order Java
Reverse Order Java   I am trying to get this into reverse order. Does... in reverse order: "); for (int i = numbers.length-1; i >=0; i...); System.out.println("Numbers in reverse order: "); for (int i = numbers.length-1; i
Pizza Order..?? - Java Beginners
Pizza Order..??  Define a class PizzaOrder class that contains a list... the cost of the entire order. Small pizza costs RM9.90, a medium pizza... wantMore = "n"; PizzaOrder order = new PizzaOrder(); do { order.pepporoni
Mysql ASC Order
Mysql ASC Order       Mysql ASC Order is used to sort the result set by ascending or descending order. The Order by CLAUSE sort the result by specified column. Understand
 

 

 

DMCA.com