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



Home Answers Viewqa WebSevices how to search
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


arvindkumar
how to search
2 Answer(s)      5 years and 11 months ago
Posted in : WebSevices



Advertisement
View Answers

January 23, 2009 at 4:02 AM


Hi friend,



I am sending code. if you have any problem then send me code and explain in detail, what's your proper query.


import java.sql.*;

public class SelectState {
public static void main(String a[]) {
Connection con = null;
String url = "jdbc:mysql://localhost:192.168.10.211/";;
String dbName = "amar";
String driver = "com.mysql.jdbc.Driver";
String userName = "amar";
String password = "amar123";
try {
Class.forName(driver).newInstance();
con = DriverManager.getConnection(url+dbName,userName,password);
Statement st = con.createStatement();
ResultSet rs = st.executeQuery("select Name from Employee");
System.out.println("Results");
while( rs.next() ) {
String data = rs.getString(1);
System.out.println(data);
}
st.close();
}
catch( Exception e ) {
System.out.println(e.getMessage());
e.printStackTrace();
}
}
}

-----------------------------------

Please visit for more informaton:

http://www.roseindia.net/jdbc/

Thanks.

Amardeep


January 24, 2009 at 5:01 AM


Hi arvind

i am sending some link to you, where you can found the solution of your problem.


http://roseindia.net/sql/LIKE-Operator.shtml
http://roseindia.net/sql/sql-and-like.shtml


Thanks
sandeep


Related Tutorials/Questions & Answers:
how to search - WebSevices
how to search  how can I write mysql query for the following search format? Search By:(this have following options)(name,username,email) gender : male or female or both age : fromage to toage country
How to include website in google search?
How to include website in google search?  Does anyone has idea about how to include a website into Google Search?   Visit the given Google website link on how to oiptimize or submit your website to Google. http
Advertisements
How to perform search using AJAX?
How to perform search using AJAX?  Hi, I have following HTML code...; <td><label for="status">Search Status</td> <td><input..." value="Please enter search criteria"/></td> </tr> <tr>
How to search entry in ZipFile.
How to search entry in ZipFile. In this tutorial, We will discuss the use of getEntry() method. The getEntry() methods are available in ZipFile... will search given entry in a zip file. The getEntry method search
search
search  how to develop search box and how to retrive data from database..   Please visit the following link: Search box
How to write a search functionality using javascript/jquery
How to write a search functionality using javascript/jquery   How to write a search functionality using javascript/jquery for ex: im searching "s" names it wil display "s" names
how to write a program to search a record using mvc2
how to write a program to search a record using mvc2   how can we write a code to search a record in table by using java bean as model, servlet as contoller and jsp as view
how to search a word on entire database? - SQL
how to search a word on entire database?  hi, I want to search a word into the entire database.. note: not from particular table.. using php and mysql. any way to find this? thanks in advance
SEARCH
SEARCH  how can we do search in jsp...? option for search criteria like name and DOB...   Please visit the following links: http://www.roseindia.net/jsp/user-search.shtml http://www.roseindia.net/servlets/search.shtml
how to search data in xml files using php
how to search data in xml files using php  So I want to create a website that allows me (or others) to type in a words and select a relevent search... this and how can I use PHP to allow them to search through, and then display
how to search the string arraylist contains database rows?
how to search the string arraylist contains database rows?  i need to search 2 database. one is excel database and another is SQL database. stored.... how do i do
How to using Binary Search Array Java ?
How to using Binary Search Array Java ?  Hi, I am beginners in Java... functions. The problem is that how to use binary search array in Java. Please give any online reference show that i will implement the binary search array in Java
How to code a Product id search engine?
How to code a Product id search engine?  I always wonder how people... a search box that let users search products with id. Suppose, "If an user enters id:1234 (and hits search button) go to product page url: http://#" if user
Search
Search   Hi, I have a project in which I am trying to enter "Marathi" (Indian local language) data in JSP using JSTL and trying to search data... and tries to search then It shows no data from database
How to create binary search tree using an array?
How to create binary search tree using an array?  hello people, pls... search tree based on data inside this array. the array contains names of people... i right? how do i do it?   class bnode { String key; bnode
how to show search results in the same panel of jframe to where search field and button is present..
how to show search results in the same panel of jframe to where search field... ,In the given code search results is being displayed in the other jframe. But in my application i need to show search results in the same panel of jframe to where
How can i search and insert within a query
How can i search and insert within a query  if it is possible... semester and degree if i search batch 2008 , semester first and degree bscs then search... that when seat numbers more then one problem generates how insert multiple values
How to search the selected item in row table using radia button in JSP?
How to search the selected item in row table using radia button in JSP?  How to search the selected item in row table using radia button in JSP
How to search the table name in MS SQL Database 2005 from application
How to search the table name in MS SQL Database 2005 from application  How to search the table name in MS SQL Database 2005 from application from our helpdesk application? application might be in html
how to show search results in the same panel of jframe to where search field and button is present..
how to show search results in the same panel of jframe to where search field... where i have to show the search result in the same panel of where search field... next search value in the textfield it makes another set of columns
how to get data using dropdownlist, textbox and search button in jsp
how to get data using dropdownlist, textbox and search button in jsp  Hi, I want to display data using jsp,javascript and mysql. My Q. is If i select...' in textbox and click on search button it should show me all the title names
Search index
Search index  how to write code for advanced search button
how to search for string using LIKE operator instead of integer?
how to search for string using LIKE operator instead of integer?  ... to search for itemid, then it shows "dbtable.jsp" file with 3 columns of itemid... in itemid. however, what i want to do is i want the user to search for the itemname
how to display data from database according to entered value in search field
how to display data from database according to entered value in search...; <input type="submit" name="submit" value="Search">...="submit" name="submit" value="Search"> <input type
Search Directory on Ftp Server
This tutorial describes how to search a specific directory on the server by using java
Tutorials of web promotions: Learn the steps to promote your website in search engines
Search Engine Optimization How to Increase Web Traffic... the usability of the website for both the users and the search engines. It includes a set of activities which leads to higher ranking in the search engine
Developing Search Engine in Java
, and then show you how you can develop your own search engine for your website... them automatically in order of relevance. How different search engines retrieves.... In the next section we will see how our search engine works
How to show multiple identicle rows from database on clicking search button to jtable
How to show multiple identicle rows from database on clicking search button to jtable  Hello Sir, I made search button with textfield .when i enter search value in the search field only one row is displayed
How to show multiple identicle rows from database on clicking search button to jtable
How to show multiple identicle rows from database on clicking search button to jtable  Hello Sir, I made search button with textfield .when i enter search value in the search field only one row is displayed
How to show multiple identicle rows from database on clicking search button to jtable
How to show multiple identicle rows from database on clicking search button to jtable  Hello Sir, I made search button with textfield .when i enter search value in the search field only one row is displayed
search program
search program  i m writing program which takes company names from.......m confused....how can i find best match..between my company name ..and all links after google search...plzz help
Advertisements
 

 

 

DMCA.com