Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

insertion of values

 
rakhi sinha
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using following code to insert the values from a servlet to database.....i1,q1,c1,i2,q2,c2,i3,q3,c3 and other values are retrieved from servlet....then are stored in pdf but if i want to enter only one value from the servlet that is only value of i1,q1,c1.then what should i do....
coding of servlet (to enter values ) is as

this code for inserting values from user with the help of servlet


This is another servlet in which i am retreiving values from the first servlet


and ny problem is this ...that if i insert values in first servlet for only i1,q1,c1 then it will give error because these are inserted in the database and exception is thrown (SQLException caught: ORA-00936: missing expression )
i dont want these fields compulsory....what should i do for this
 
Wendy Gibbons
Bartender
Posts: 1111
Eclipse IDE Oracle VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
rakhi sinha wrote:I am using following code to insert the values from a servlet to database.....i1,q1,c1,i2,q2,c2,i3,q3,c3 and other values are retrieved from servlet....then are stored in pdf but if i want to enter only one value from the servlet that is only value of i1,q1,c1.then what should i do....
coding of servlet (to enter values ) is as



I am sorry I am completely lost you say you only want to insert 1 value from the servlet then list 3 items i1,c1 and q1.
It is very difficult to follow code when the variable and colum names are so short and meaningless. If this is actual production code it is almost completely unmaintainable.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic