View Single Post

  #4 (permalink)  
Old 07-13-2009, 04:06 AM
anandfuns anandfuns is offline
Junior Member
 
Join Date: Jul 2009
Posts: 1
anandfuns is on a distinguished road
hi,

I can help u out but i need need sum clarifications.. If my understanding is correct then its merely database table updations.. If I know the employee id of the users.. then i can use the select statement to search the table entry n read the action column value from the matching record.. then append it with the corresponding item.. finally use the update query to make the updation back to the database table..

sqlconnection con = new connection("give the connection string here");
sqlcommand cmdSelect = new sqlcommand("select action from customer where custid= "+ cust_id,con);// cust_id is the id of the corresponding user
if(cmdSelect.executescalar() != string.empty)
{
sqlcommand cmdUpdate = new sqlcommand("udate customer set action = action" + "," + item + " where custid = "+cust_id,con);
cmdUpdate.executeNonQuery();

}

Note:
The keyword casing is not properly given..


with Regards,
Anand Kumar .I
Reply With Quote