• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

value operations on database

 
egbai mmumene
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can't seem to get the right syntax for using the UPDATE and SET statement getting an error line at the "notxt" variable. i'm trying to minus a variable in the database by 1 every time an action is performed here is the code
 
Wendy Gibbons
Bartender
Posts: 1111
Eclipse IDE Oracle VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Egbai can you format your post to use code tags, can you look at other posts and see how much easier they are to read.

and can you provide us with the exact exception text please.

do you want to update every movie on the database, as without a where clause that is what will happen.
 
Wendy Gibbons
Bartender
Posts: 1111
Eclipse IDE Oracle VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
and what type is stat i am presuming it is a Statement, but it may not be.
 
egbai mmumene
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes its stat is statement. There is no exception cause i've not run the code yet due to the error line appearing at the "notxt" variable. Want to know how to put the quotations or declare the variable if it is in the wrong way. Then please i dont know how to add the WHERE clause due to the earlier error. Thanks
 
Paul Clapham
Sheriff
Posts: 21322
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you tell us what this "error" is? For all we know it's a compiler error and nothing at all to do with the syntax of your SQL. So copy it from wherever you're seeing it, and post it in a reply here.
 
shiva pandey
Greenhorn
Posts: 10
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have declared your "notxt" varriable inside the while loop and using it outside the loop.
 
Wendy Gibbons
Bartender
Posts: 1111
Eclipse IDE Oracle VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
egbai mmumene,
Your post was moved to a new topic.
i have split the last question out and moved it to the swing forum.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic