how to delete entry in a database through java servlet run in eclipse??
Hello , I need help editing this java code which aims to delete an entry from a database run by mysql. this code will be run through eclipse. I already tried to edit and made sure all variable names and types were correct but it just would not work. Please help! thanks a lot!!!
public String delResolution(int id)
{
try
{
ConMan con = new ConMan();
Statement stmt = con.logOn().createStatement();
String msg = "";
String sql = "delete from ledger where id="+id;
if (stmt.execute(sql))
{
msg = "Delete failed";
} else
{
msg = "Delete successfully";
}
con.logOff();
return msg;
(Also, please do not post duplicate threads in different sections for the same question. Thanks. )
I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
Please use [Code]your code goes in here[/Code] tags when posting code.
Before posting your question, did you look here?
Got a question on Linux? Visit our Linux sister site. Modifications Required For VB6 Apps To Work On Vista
Bookmarks