• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Rob Spoor
  • Henry Wong
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh
  • Jj Roberts

Check if the input quantity is greater than the available quantity in database JavaFX

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am having a sell page that contains TextField with the name quantity.
I want to check if the input quantity by the user is greater than the quantity in the database.
Is there any recommendation on how to do it?
Any recommendation is appreciated.
Thanks from now.

 
Bartender
Posts: 1303
39
IBM DB2 Netbeans IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It mostly depends on how you organize data in your application.Assuming that you have a table  with goods inventory, and another table for registered orders,  available items are given by  count of goods on inventory table minus the count of registered orders.
You have to query your db, using ipa or directly via jdbc
 
When people don’t understand what you are doing they call you crazy. But this tiny ad just doesn't care:
SKIP - a book about connecting industrious people with elderly land owners
https://coderanch.com/t/skip-book
reply
    Bookmark Topic Watch Topic
  • New Topic