Win a copy of Murach's MySQL this week in the JDBC and Relational Databases forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Updating database from Servlet

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hai
I have thsi vague problem.
I made a simple phone book whick queries number according to name. It worked until I wanted to add counter to it.
When ever I click it also should update a Counter table in a database. I made a class for the updation process.
Its called UpdatePhoneBookCounter(Connection con).
First I used it from command line. I passed a connection from another test and also passed a date-string(new Date().toString()) so that it updates the table with date, month, year, day etc.
It works on command line.
But same creation of pdate class passing a connection has spoilt my basic phonebook too.
Is this because I am using the same connection for getting the phonenumber from 1st table and then again using it for updation??? ( I get the connection from another class Oracle Connection which is surely working)
Please help.

------------------
 
rk t
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I forgot to give the URl. http://webprojects.cs.tamu.edu:8000/web-ugrad/spring2001/489-3/docs/PhoneBook10WithCounter.html
The counter applet works with already existing data.
The update doesnot work.
 
Sheriff
Posts: 7001
6
Eclipse IDE Python C++ Debian Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"rk t",
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please log in with a new name which meets the requirements.
Thanks.
 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello rk t,
First of all same connection can be used for more than one queries so you can count out that reason for the error. Secondly I tried to reach the link you have given but in vain it is not working. It gives me misspelled URL exception.
Smita
 
Won't you please? Please won't you be my neighbor? - Fred Rogers. Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic