473,320 Members | 2,088 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

DatakeyField with multi-column primary key

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(intClientI D)

MyResults.Tables(0).DefaultView.Delete(e.Item.Item Index())

MyResults.Tables(0).AcceptChanges()

dlSchedule.DataSource = MyResults

DataBind()

End If

End Sub
Nov 18 '05 #1
0 972

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: * ProteanThread * | last post by:
but depends upon the clique: ...
0
by: frankenberry | last post by:
I have multi-page tiff files. I need to extract individual frames from the multi-page tiffs and save them as single-page tiffs. 95% of the time I receive multi-page tiffs containing 1 or more black...
6
by: cody | last post by:
What are multi file assemblies good for? What are the advantages of using multiple assemblies (A.DLL+B.DLL) vs. a single multi file assembly (A.DLL+A.NETMODULE)?
0
by: A frustrated developer | last post by:
I would like to find a specific row on web datagrid, locate its pageindex and itemindex, then highlight to the specific row I found. I know its datakeyfield value, is there anyway we could search...
0
by: A frustrated developer | last post by:
I would like to find a specific row on web datagrid, then highlight the row by its pageindex and itemindex on that page. I know its datakeyfield, is there a way to find the row by its datakeyfield...
0
by: A frustrated developer | last post by:
I would like to find a specific row on the web datagrid, then highlight the row by its pageindex and itemindex on that page. I know its datakeyfield, is there a way to find the row by its...
4
by: mimmo | last post by:
Hi! I should convert the accented letters of a string in the correspondent letters not accented. But when I compile with -Wall it give me: warning: multi-character character constant Do the...
4
by: Ismail Rajput | last post by:
Is there any option we can use Composite DataKeyField in the DataList and DataGrid?
5
by: bobwansink | last post by:
Hi, I'm relatively new to programming and I would like to create a C++ multi user program. It's for a project for school. This means I will have to write a paper about the theory too. Does anyone...
0
by: Sabri.Pllana | last post by:
We apologize if you receive multiple copies of this call for papers. *********************************************************************** 2008 International Workshop on Multi-Core Computing...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.