• Post Reply Bookmark Topic Watch Topic
  • New Topic

How do I hook JTextFields, JCombos, and Other fields to the Database?

 
Jacky Luk
Ranch Hand
Posts: 634
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd like to keep maximum consistency with the database and the form.
How do I "hook" the database to the form, fields etc, hope it is the right forum...
Thanks
Jack
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You will have to detail out what you mean by "maximum consistency" and what you are trying to achieve here.
If your goal is to have your UI reflect the latest state (and changes) to the data, then it would depend on how your application is setup. Are the DB and the client on the same machine?
Please TellTheDetails
 
Jacky Luk
Ranch Hand
Posts: 634
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maneesh Godbole wrote:You will have to detail out what you mean by "maximum consistency" and what you are trying to achieve here.
If your goal is to have your UI reflect the latest state (and changes) to the data, then it would depend on how your application is setup. Are the DB and the client on the same machine?
Please TellTheDetails


I actually meant that like that hibernate persistence thing,
But how can I do the same without these frameworks?
Because I am running out of time.
Thanks
Jack
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By
like that hibernate persistence thing

do you mean to say that value from textFieldInstance1 should be inserted to x table y column in the DB?
Like I requested before, please TellTheDetails. We cannot keep guessing what exactly you are trying to achieve here.
 
Jacky Luk
Ranch Hand
Posts: 634
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maneesh Godbole wrote:By
like that hibernate persistence thing

do you mean to say that value from textFieldInstance1 should be inserted to x table y column in the DB?
Like I requested before, please TellTheDetails. We cannot keep guessing what exactly you are trying to achieve here.


Yes, sort of, I would like to have the JTextField bound to the database without doing this.
Because there are heaps of them


Is there a way to automate this in netbeans?
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!