Results 1 to 6 of 6
- 02-09-2012, 07:23 AM #1
Member
- Join Date
- Dec 2011
- Posts
- 6
- Rep Power
- 0
retiving daabase values by clicking a button
I am new to java, I have a requirement that
I have a table like
Id---Name---Password---email---phone
101 naveen-11111--- nn@gmail--**** UPDATE
************************************* UPDATE
************************************ UPDATE
like this.
UPDATE is the button, If we click on UPDATE button, that particular row details must be come in another table like
Id----*********
Name--*********
Password -*****
Email--*******
phone---********
like this, I aam using jsp, and back end is Oracle and Type1 driver...
Please help me.............
Thanks and regards
Naveen
- 02-09-2012, 09:19 AM #2
Senior Member
- Join Date
- Jan 2012
- Posts
- 210
- Rep Power
- 2
Re: retiving daabase values by clicking a button
One way how You could do it:
1. Create Connection(object) to database (using DriverManager or DataSource).
2. Create Statement object that will insert necessary rows from table1 into table2(using apropriate SQL statement, say: INSERT INTO databaseX.table2 SELECT ... FROM databaseX.table1 WHERE ...)Last edited by diamonddragon; 02-09-2012 at 09:47 AM.
- 02-09-2012, 12:10 PM #3
Re: retiving daabase values by clicking a button
Use PreparedStatement instead of Statement.
dbWhy do they call it rush hour when nothing moves? - Robin Williams
- 02-09-2012, 12:56 PM #4
Senior Member
- Join Date
- Jan 2012
- Posts
- 210
- Rep Power
- 2
- 02-09-2012, 01:50 PM #5
Moderator
- Join Date
- Apr 2009
- Posts
- 10,484
- Rep Power
- 16
Re: retiving daabase values by clicking a button
It's only one statement, so batching would be unecessary.
Actually, the title of this thread doesn't seem to match the OP...the title implies a SELECT, and the post is talking about an UPDATE.
- 02-09-2012, 02:19 PM #6
Senior Member
- Join Date
- Jan 2012
- Posts
- 210
- Rep Power
- 2
Similar Threads
-
Clicking button on HTML page
By nephos in forum Advanced JavaReplies: 1Last Post: 10-08-2011, 03:52 PM -
how to set a value from a Combobox after Clicking Ok button
By Khan05 in forum AWT / SwingReplies: 6Last Post: 08-24-2011, 02:52 PM -
How to open new JFrame with clicking on button?
By phearless in forum AWT / SwingReplies: 1Last Post: 01-14-2011, 10:36 AM -
How to insert a row into JTable when clicking Add Button
By geekchick in forum New To JavaReplies: 3Last Post: 08-07-2010, 08:06 PM -
Get source web page after clicking next Button
By noob in forum New To JavaReplies: 1Last Post: 03-05-2010, 09:01 PM


1Likes
LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks