Knowledge Share

Knowledge is NOT Power IMPLEMENTATION of knowledge is Power!!!
 
HomePortalGalleryCalendarFAQRegisterUsergroupsLog in

Share | 
 

 Add Edit Delete

View previous topic View next topic Go down 
AuthorMessage
Admin
Admin


Posts : 141
Points : 407
Reputation : 0
Join date : 2007-12-29
Location : Chennai

PostSubject: Add Edit Delete   Mon Feb 08, 2010 11:13 am

To Add, Edit N To Delete Records

In Form Declaration
Dim dt As DataTable
Dim dr As DataRow

In Form Load Event

dt = DataSet11.Tables("courses")
To Add

dr = dt.NewRow
dr(0) = TextBox1.Text
dr(1) = TextBox2.Text
dr(2) = TextBox3.Text
dt.Rows.Add(dr)
USRUPDATE()


'To edit table row
dr = dt.Rows.Find(TextBox1.Text)
dr.BeginEdit()
dr(0) = TextBox1.Text
dr(1) = TextBox2.Text
dr(2) = TextBox3.Text
dr.EndEdit()
USRUPDATE()

'To delete aRecord
dr = dt.Rows.Find(TextBox1.Text)
dr.Delete()
USRUPDATE()


SUB USRUPDATE()
OleDbDataAdapter1.Update(DataSet11, "courses")
MsgBox("The Opeeration Done")
OleDbDataAdapter1.Fill(DataSet11, "courses")
End sub
Back to top Go down
http://knowledgeshare.forumotion.com
 
Add Edit Delete
View previous topic View next topic Back to top 
Page 1 of 1
 Similar topics
-
» Selenium RC with C#: How to Delete or edit particular item?
» Export IDE code to JUNIT4, edit and import back to IDE
» EDIT TEXT AREA
» How do I edit or delete a poll?
» How to delete cache automatically in selenium

Permissions in this forum:You cannot reply to topics in this forum
Knowledge Share :: .Net-
Jump to: