• 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

Help about field Value Reset to 0 ?

 
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have a demo application in which there is a link..If user Clicks on that link i increment the counter in my database table.The counter field has type bigint. After trial run ...When i see the counter value in the database then it is Reseted to 2...After trial run it has value 250 but it Shows counter now 2 why this is happen ??? is there any problem of Concurrency ??

Please Help me ..

Thanks
[ March 25, 2008: Message edited by: Rahul Nair ]
 
Ranch Hand
Posts: 252
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It depends on your code.....
But one thing seems very obvious..

you might have done something like you intialized the variable , started incrementing that and putting in database.So, the problem is when the Servlet reloads that variable might be again setted to its intial value.

I assumed this problem depending upon your Query.
 
reply
    Bookmark Topic Watch Topic
  • New Topic