• 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
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

Update Database

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Here is what you need.

JDBC Tutorial
 
Sander Silva
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • 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: 2658
19
Netbeans IDE C++ Linux
  • Likes 1
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • Quote
  • Report post to moderator
...if you are using a PreparedStatement.

 
Jan Cumps
Bartender
Posts: 2658
19
Netbeans IDE C++ Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And you have 4 columns, but provide values to only the last three.
 
What? What, what, what? What what tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic