This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Hands On Software Engineering with Python and have Brian Allbey on-line!
See this thread for details.
Win a copy of Hands On Software Engineering with Python this week in the Jython/Python forum!
  • 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
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

error of missing values  RSS feed

 
Ranch Hand
Posts: 225
IBM DB2 Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
AddUser.java



addUser.jsp

when i'm trying the above code the following error is coming
"ORA-00947: not enough values"
 
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a DB issue.
It say's the no of columns doesn't match with what you are trying to add. PERSONS table might be containing more or less columns.
 
Ranch Hand
Posts: 68
IBM DB2 Eclipse IDE Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is probabaly the error of unequal set column and values you are inserting, in your SQL Query. just try this.
 
Rancher
Posts: 1920
15
Android Eclipse IDE Java Java ME
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use PreparedStatement.
 
Sheriff
Posts: 21555
100
Chrome Eclipse IDE Java Spring Ubuntu VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Neeraj is right in that you need to specify the columns for inserting. Right now your statement expects a value for each and every column, in the right order. You're missing at least one value (possibly the auto-generated primary key?). Swastik is right that you should use PreparedStatement to prevent SQL injection.

And Megha, I believe this is the second time you posted code with some lines with very much spaces at the end. These mess up our forum layout a bit; can you try to remove those spaces next time? I've done it this time for you.
 
Why fit in when you were born to stand out? - Seuss. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!