[Logo]
Forums Register Login
delete not working
in my following code


and following is my servlet code
i have to perform delete operation but its not working
i want to know in the following code


String P_NO = viewList.get(6).toString();

it will going to read which element from the database or it will going to read the fields i have mentioned in the page because i used selected fields from the database
my data base is following




"LASTNAME" VARCHAR2(255 BYTE),
"FIRSTNAME" VARCHAR2(255 BYTE),
"ADDRESS" VARCHAR2(255 BYTE),
"CITY" VARCHAR2(255 BYTE)
"AGE" VARCHAR2(255 BYTE)
"RELATION" VARCHAR2(255 BYTE)
"P_NO" VARCHAR2(255 BYTE)






 

Megha Singhal wrote:in my following code


and following is my servlet code
i have to perform delete operation but its not working
i want to know in the following code


String P_NO = viewList.get(6).toString();

it will going to read which element from the database or it will going to read the fields i have mentioned in the page because i used selected fields from the database
my data base is following




"LASTNAME" VARCHAR2(255 BYTE),
"FIRSTNAME" VARCHAR2(255 BYTE),
"ADDRESS" VARCHAR2(255 BYTE),
"CITY" VARCHAR2(255 BYTE)
"AGE" VARCHAR2(255 BYTE)
"RELATION" VARCHAR2(255 BYTE)
"P_NO" VARCHAR2(255 BYTE)


i have checked the code through view source on delete button function
this is showing the values for deletion
and also following line should be like
not 6 as through 0 it is taking right value for deletion but now the problem is why it is not deleting




 


It's surprising the above works!! How can an object be compared to a string?
 

Swastik Dey wrote:

It's surprising the above works!! How can an object be compared to a string?



if i am writing this then also its not working, the problem is not this because same code is working in another program for another table but not working for this ,
i just have one doubt how to pass varchar object like "5674A" can pass through from jsp to servlet through query string like below
Why it is not deleting is a different issue. But both of your codes are wrong, and it's really surprising how is it working in the other program. An object can neither be compared to a String nor it can be compared to an integer in the way you are doing. As per my understanding what you are trying to check is, arraylist's size is not 0. So, it should have been
 

Swastik Dey wrote:Why it is not deleting is a different issue. But both of your codes are wrong, and it's really surprising how is it working in the other program. An object can neither be compared to a String nor it can be compared to an integer in the way you are doing. As per my understanding what you are trying to check is, arraylist's size is not 0. So, it should have been


sorry i was mean this only.
now please tell me why it is not working
What are you doing? You are supposed to be reading this tiny ad!
Thread Boost - a very different sort of advertising
https://coderanch.com/t/674455/Thread-Boost-feature


This thread has been viewed 776 times.

All times above are in ranch (not your local) time.
The current ranch time is
Apr 23, 2018 06:41:06.