how to update database using mysql and jsp

Reply

Join Date: Oct 2007
Posts: 15
Reputation: nikhita is an unknown quantity at this point 
Solved Threads: 0
nikhita nikhita is offline Offline
Newbie Poster

how to update database using mysql and jsp

 
0
  #1
Oct 26th, 2007
can somebody prove me the coding to update the database (mysql) with JSP
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 4,273
Reputation: peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of 
Solved Threads: 494
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Code tags enforcer

Re: how to update database using mysql and jsp

 
0
  #2
Oct 29th, 2007
Google is your friend! There are many examples over the internet, for example this site http://www.java2s.com/Tutorial/Java/...__Database.htm
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 7
Reputation: Shubhra is an unknown quantity at this point 
Solved Threads: 0
Shubhra Shubhra is offline Offline
Newbie Poster

Re: how to update database using mysql and jsp

 
0
  #3
Nov 2nd, 2007
U can write all code using scriptlet. Simply start scriptlet,create connection, write and execute update query, close connection and scriptlet.
For Ex
<%
create connection
Create query
resultset
execute query
close connection
%>
Hope it provides u some help!!

U can find example code in google.
Reply With Quote Quick reply to this message  
Join Date: Feb 2006
Posts: 2,467
Reputation: masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of 
Solved Threads: 267
Moderator
masijade's Avatar
masijade masijade is offline Offline
Nearly a Posting Maven

Re: how to update database using mysql and jsp

 
0
  #4
Nov 2nd, 2007
Originally Posted by Shubhra View Post
U can write all code using scriptlet. Simply start scriptlet,create connection, write and execute update query, close connection and scriptlet.
For Ex
<%
create connection
Create query
resultset
execute query
close connection
%>
Hope it provides u some help!!

U can find example code in google.
Which is, of course, exactly the wrong way to do it, reagardless of whether it works or not.

You can also scratch your back with a butcher knife, but I wouldn't suggest it.
Java Programmer and Sun Systems Administrator

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

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 7
Reputation: Shubhra is an unknown quantity at this point 
Solved Threads: 0
Shubhra Shubhra is offline Offline
Newbie Poster

Re: how to update database using mysql and jsp

 
0
  #5
Nov 2nd, 2007
Ya OK.
What I provided was actually the short cut.
Correct way is to do all such stuff in class. Create object in jsp and simply execute the method!!

Am I correct now??
Reply With Quote Quick reply to this message  
Join Date: Feb 2006
Posts: 2,467
Reputation: masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of 
Solved Threads: 267
Moderator
masijade's Avatar
masijade masijade is offline Offline
Nearly a Posting Maven

Re: how to update database using mysql and jsp

 
0
  #6
Nov 2nd, 2007
Well, if you knew the right way, why did you suggest the wrong way?

As I said:

You can also scratch your back with a butcher knife, but I wouldn't suggest it.
Java Programmer and Sun Systems Administrator

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

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 7
Reputation: Shubhra is an unknown quantity at this point 
Solved Threads: 0
Shubhra Shubhra is offline Offline
Newbie Poster

Re: how to update database using mysql and jsp

 
0
  #7
Nov 2nd, 2007
Actually I wrote what came first to my mind.
Your comment stroke me to give a2nd thought.
I apologise.
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 15
Reputation: nikhita is an unknown quantity at this point 
Solved Threads: 0
nikhita nikhita is offline Offline
Newbie Poster

how make a jsp page printer friendly

 
0
  #8
Nov 7th, 2007
the link you provided was helpful. thanks a lot.

sorry for the delay in reply..

One more help needed....

can u tel me how make a jsp page printer friendly
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 5799 | Replies: 7
Thread Tools Search this Thread



Tag cloud for JSP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC