how to use dataset and data class to select insert update fill the tavle in sql2008

Posted by Shanky11 under ASP.NET on 2/26/2013 | Points: 10 | Views : 1137 | Status : [Member] | Replies : 0
i have created a dataset and data class
how can i use this to select,insert update delete and fill like this i have created two foe selct and insert
now i want it for delete and update
---------------------i m pasting below my code---------
Public Class ContactsDataClass

Public ContactsDS As ContactsDataSet
Private eContactMTableAdapter As ContactsDataSetTableAdapters.ContactMTableAdapter

Public Sub New()
ContactsDS = New ContactsDataSet
eContactMTableAdapter = New ContactsDataSetTableAdapters.ContactMTableAdapter
Catch ex As Exception
Throw ex
End Try
End Sub

Public Sub FetchContactDataTable()
Catch ex As Exception

End Try
End Sub

Public Sub Commit()

End Sub

Private Sub Insert()
If ContactsDS.ContactM.GetChanges(DataRowState.Added) IsNot Nothing Then
End If
End Sub
Public Sub update()
eContactMTableAdapter.Update (ContactsDS .ContactM
End Sub

End Class


(No response found.)

Login to post response