DatakeyField with multi-column primary key
From: Beryl Small (berylsmall_at_computechsi.com)
Date: 03/01/04
- Next message: George Durzi: "Caching a Large DataSet"
- Previous message: Scott M.: "Re: A good book on ASP.NET & JavaScript"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 29 Feb 2004 18:24:00 -0600
Have a datalist bound to a dataset. When I run the following code it
deletes the selected record from the screen but not from the underlying
table. The dataset is made up of three joined tables, the primary key on
the main table is made up of two fields (ClassID and StudentID) can anyone
tell me why my code does not work?
Private Sub dlSchedule_ItemCommand(ByVal source As Object, ByVal e As
System.Web.UI.WebControls.DataListCommandEventArgs) Handles
dlSchedule.ItemCommand
If e.CommandName = "DeleteClass" Then
Dim myDv As DataView
Dim intClientID As Integer
intClientID = Session("Client")
Dim StudentSchedule As GNOIEC.GNOIECWEB = New GNOIEC.GNOIECWEB
MyResults = StudentSchedule.GetCurrentRegistrations(intClientID)
MyResults.Tables(0).DefaultView.Delete(e.Item.ItemIndex())
MyResults.Tables(0).AcceptChanges()
dlSchedule.DataSource = MyResults
DataBind()
End If
End Sub
- Next message: George Durzi: "Caching a Large DataSet"
- Previous message: Scott M.: "Re: A good book on ASP.NET & JavaScript"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|