• 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

Update Database

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All!

I'm trying to create an Update Gui for my Access database.
I create a insert GUi successfull, but I failed to convert it for Updating.
my updating code is full of errors, so i decided to post my Select
code, it is properly working. Please help me to create and Updating GUI.
in UPDATE statement WHERE clause should be equal to SVID

should be something like this

UPDATE Main
SET Family=(Family)
SET Genus=(Genus)
SET Species=(Species)
WHERE SVID=(SVID);

Updated values should pass from UpdateGui.java file.

UpdateGui.java


UpdateCode.java (Here is my Select query, please help to use it for Updating)



Please kindly help me, I'm new to Java and SQL.
 
Ranch Hand
Posts: 182
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here is what you need.

JDBC Tutorial
 
Sander Silva
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you very much!

Please can you give me a little help on the Query statement
What's wrong with this one,
 
Bartender
Posts: 2662
19
Netbeans IDE C++ Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

two single quotes?

While you are reading the tutorial, have a look at PreparedStatement. It would resolve errors like this.

 
Fatih Keles
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Your update query has to be in this format.

 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
...if you are using a PreparedStatement.

 
Jan Cumps
Bartender
Posts: 2662
19
Netbeans IDE C++ Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And you have 4 columns, but provide values to only the last three.
 
Arthur, where are your pants? Check under this tiny ad.
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic