Click here to Skip to main content
15,885,757 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm creating a login form and has functions of edit, delete and saving the data. The problem is in the edit or update part, when i'm about to edit for example a username, then i clicked the button edit the edited version is being saved as well as the data that is to be edited. So when i edit a data there is a duplication.

This is my code for the edit part. I'm using flash cs6 and sqlite.

function update(MouseEvent):void
{
var stat:SQLStatement = new SQLStatement();
stat.sqlConnection = connection;
stat.text = "UPDATE player SET fname=@fname,
dateplayed=@dateplayed, timein=@timein
WHERE fname=" + itemList.selectedItem.data.idd;
stat.parameters["@fname"] = fname.text;
stat.parameters["@dateplayed"] = dateplayed.text;
stat.parameters["@timein"] = timein.text;
stat.execute(-1, new Responder(selectItems));
fname.text = "";
dateplayed.text = "";
timein.text = "";
}


Hope you could help me, i'm just a newbie in flash. Thanks in advance
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900