5 pts.
 updating, deleting in access with asp.net using Visual basic
hi, i m using  asp.net 2005 usin vb. i m having gridcontrol with the back end of msaccess.  i know to retrive the data from databse by using tis code, Dim msaccessconnect, query, databasecommunication, readdatabase         msaccessconnect = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;data source=" & Server.MapPath("db1.mdb"))         msaccessconnect.Open()         query = "SELECT * FROM `advertiser`"         databasecommunication = New OleDbCommand(query, msaccessconnect)         readdatabase = databasecommunication.ExecuteReader()         GridView1.DataSource = readdatabase         GridView1.DataBind()         readdatabase.Close()         msaccessconnect.Close() but i dont know to write the code for editing, updating and deleting. HELP ME anyone!!!!!!!!!!! PLEASE!!!!!!!

Software/Hardware used:
ASKED: August 12, 2010  5:52 PM
UPDATED: December 15, 2010  11:07 PM

Answer Wiki:
You would update or delete records almost the same way as executing the query to populate your grid, but you would use the ExecuteNonQuery method: <pre> query = "DELETE FROM advertiser WHERE <some_column> = <something>" UpdateOrDeleteCommand = New OleDbCommand(query, msaccessconnect) UpdateOrDeleteCommand.ExecuteNonQuery() </pre>
Last Wiki Answer Submitted:  December 15, 2010  11:07 pm  by  carlosdl   63,535 pts.
All Answer Wiki Contributors:  carlosdl   63,535 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _