question on swings i.e delete button

S

smart

Hello, Good Morning every one i am new to work with swings i am facing
problem with delete button.

In an application i kept a button Delete . For delete button i have
taken ShowConfirmDialog i.e YES_NO_OPTION.

When i press YES it is deleting record which is correct. But when i
press NO button it is deleting record which is not happen. I used for
delete query is like this

[ pstmtdel=con.prepareStatement("delete from ICLASS where
Sno='"Sno"'"); ]

[pstmtdel.executeUpdate();]

And try with if condition also when i put query in if condition it's
showing an error .

Error is variable pstmtdel might not have been initialized

So, how can solve this one. Help me regarding this topic


Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,521
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top