Share on Google+Share on Google+

java database pblm
1 Answer(s)      8 years ago
Posted in : Java Beginners


View Answers

February 26, 2009 at 7:00 AM


u can easily findout the third record from the database.
the following code may be useful for u.

ResultSet rs = stmt.executeQuery("from student where id=1");

int count = 0;
while ( {
if(count == 3){
/* here u can write the code to delete the record by getting all the column values of that record.
for ex:
int id = rs.getInteger("id");
String name = rs.getString("name");
Float marks = rs.getFloat("marks");
String qry = "delete from student where id="+id+" and name='"+name+"' and marks="+marks;
ResultSet rs1 = stmt.executeQuery(qry);



siva kumar

Related Tutorials/Questions & Answers:
java database pblm - Java Beginners
java database pblm  Hi, I have 5 records in database with the same ID. I want to delete third record. what should i do.plzz help me. thank u... record from the database. the following code may be useful for u. ResultSet rs
java database
java database  help me with this...i never learn build java database... to design and implement objects needed for a program that maintains a database.../teacher information, search it, alter it, etc. The database is maintained as a list
Database,Java  help me for the following things if one customer... me the how to write the query in MySQL database and i want coding for this one in Java.because i am using Java as the front end.   1)page.jsp: <
java and database
java and database  sir i want to prepare a sign in form and i want to check that user name is exist or not in database if it is exist in database then return it is allready exist otherwise it is registered in data base thank u
JAVA DATABASE CONNECTION WITH JTABLE  HOw To Load Database Contents From Access Database to JTable without using Vector
Map java Object to database.
Map java Object to database.  How do you map Java Objects with Database tables
Database programming - Java Beginners
Database programming  How to do a Database programing with Balanced Multiway Tree(B+ Tree,not Binary Tree) in java
Java Database Program
Java Database Program   Write a program in Java that connects to a database and generates a report consisting of the courses in whom the total percentage of number of students failed is more than 80% of the total number
java and database - Java Beginners
java and database  code to read a csv file  Hi Friend, We have used POI Library to read the csv file in java: import*; import org.apache.poi.hpsf.*; import org.apache.poi.hssf.usermodel.*; import
java with Oracle Database
java with Oracle Database  Hello I have been encountering a problem regarding creating a table with Oracle.When i am creating new table in the Database using Oracle , it is giving error saying an errror occured incursive sql
java database connection - JDBC
java database connection  sir i want to join my project with MS access database. i am making my project in netbeans.please tell me the coding to do... the data into the MS Access database and retrieve the data from the database table
java database connection
java database connection  package com.tsi.constants; public class Constant { public static final String DRIVER = "oracle.jdbc.driver.OracleDriver"; public static final String DBURL = "jdbc:oracle:thin
java database connection
java database connection  package com.tsi.constants; public class Constant { public static final String DRIVER = "oracle.jdbc.driver.OracleDriver"; public static final String DBURL = "jdbc:oracle:thin
unable to connect database in java
unable to connect database in java  Hello Everyone! i was trying to connect database with my application by using java but i am unable to connect... i was using this code.... try { Driver d=(Driver)Class.forName
java database connection - Struts
java database connection  how to connect a database in struts program?  First Add two jar file1> commons-dbcp-1.2.x.jar2> mysql...; value="jdbc:mysql:///database_name?autoReconnect=true"
java database error - JDBC
java database error  hi all i am writing one swing application where i want to insert data into database(MS-Access) but dont know how to do... the following code to insert the data into MS-Access database: import java.sql.
Java database connectivity
Java database connectivity  Hi sir I need a code to create an application where user enter name in text box and that should be stored in database. Plz help me out its very urgent.   import java.sql.*; import java.awt.
unable to connect database in java
unable to connect database in java  Hello Everyone! i was trying to connect database with my application by using java but i am unable to connect... created. 6) Restart your compiler and compile your java code. For Inserting Data
innerclass and database - Java Beginners
innerclass and database  program using innerclass to implement numerical bisection operation to call a procedure to store and update data in a database
Database - Java Beginners
Database  How to do database connection when using weblogic server? Any specific condition or difference
code for database deadlock sicuation in java
code for database deadlock sicuation in java  how to prepare code for database deadlock situation in java(JDBC
Connection to database - Java Beginners
on a Project on Jsp We hve some JSP Pages & trying to connect to our Database . We are using SQL server 2000 ? We are not able to connect our database Tables.../connect_jsp_with_mysql.shtml Because, we didn't use sql server 2000 database
java servlets with database interaction
java servlets with database interaction  hai friends i am doing a web application in that i have a registration page, after successfully registered... Servlet with database and insert data import*; import
Connecting to MYSQL Database in Java
Connecting to MYSQL Database in Java  I've tried executing the code... to the database"); conn.close(); System.out.println("Disconnected from database"); } catch (Exception e) { System.out.println("Error
database connection by using java bean
database connection by using java bean  i need a code for bean class to connect to mysql database. subsequently to use dis bean class whereever i need 2 connect 2 database
Sum database colum in java
Sum database colum in java  please i have two columns-col1 and col2, col1 contain item and col2 contain the quantity of the item columns... the database to sum the Items and display output so that it will be like
Java Connection to Oracle database
Java Connection to Oracle database  HI I am ubable to connnect jdbc to Oracle database.i had gone to control panel >>Administrative tool>>>Data source,in that forDNS name i typed Oracle and in TNS i culdn't
database connectivity in java - JDBC
database connectivity in java  import*; import java.awt.*; import javax.swing.*; import java.awt.event.*; import java.sql.*; class Project implements ActionListener { JFrame f; JPanel p1,p2,p3; JTabbedPane
Import Data to SQL database in Java
Import Data to SQL database in Java  Hi, I'm a beginner and I'm wondering how to Import Data to SQL database in Java? Thanks (Platform: Eclipse/SQL
java plus database - Java Beginners
java plus database  kathmandu Sports Club In order to have more.... Module diagram 4. Java-program   Hi friend, Code to solve the problem : database table "city" CREATE TABLE `city
Map Java Objects with Database tables
Map Java Objects with Database tables  How to map Java Objects with Database tables?   First write Java domain objects ie. beans with setter and getter methods. Then map java class to table and database columns to Java
Java Spring Hibernate Struts Training What does core Java include? java What are some way to learn Java quickly? Is it required to learn Java before learning Java Script? Is it necessary to learn java script before learning PHP? Are HTML5 and Java Script boosts Java career? Is Java object oriented? Fingerprint application with Java Uninstall Oracle Virtual Box JSON to HashMap Free Java online Training I want example of Control Statement in Java ANSI Color Codes with Python Create a Program that Calculates Input What is difference between JDK,JRE and JVM? How to see ubuntu version on server? How to get Page Source in Selenium (WebDriver) using Java? The path to the driver executable must be set by the webdriver.gecko.driver system property parse data from a link in java Java Program Qns using BlueJ How to fix HAX Kernel Module Is Not Installed error? Installing Audacity Looking for code Logic to check track changes & Coments in MSWord, MSWordx, MSExcel, MSExcelx is ON/OFF Installing JDK on Mac SAX Parser exception ERROR 601 (42P00): Syntax error. Encountered Thread java.lang.NoClassDefFoundError: org/apache/commons/fileupload/FileItemFactory How to install Ubuntu 16.04 LTS? HttpServletRequest cannot be resolved to a type in eclipse - Solved Unhandled event loop exception GC overhead limit exceeded Spring Data jpa with apache phoenix Caused by: java.lang.IllegalArgumentException: Not a host:port pair: PBUF o.a.h.h.z.RecoverableZooKeeper - Possibly transient ZooKeeper, quorum= com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager class not found com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager not found How to download and install Java 8 on Windows? How to uninstall JDK 7? How to install gtk-doc-tools package in Ubuntu? How to install Oracle JDK 8 on Ubuntu? ejabberd_ctl.beam not found - Solved How to convert date to UTC format in Java? How to install autoconf, automake and libtool in Ubuntu 15.10? How to convert current date to mm dd yyyy format in Java? How to convert current date to dd mm yyyy format in Java? How to stop window closing in "internalFrameClosing" event. How to find list of all index in Neo4j? file location SASLError using PLAIN: not-authorized how to convert war file into .exe file using java code


Advertisement null