Jump to content
Xtreme .Net Talk

KingAce

Members
  • Posts

    7
  • Joined

  • Last visited

KingAce's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. What is "test"?
  2. How can I find the last row in a datatable through code? For example, lets say in table "TBL" there are the records ID Name 1 Name1 2 Name2 3 Name3 Through code, how can I find Name3 (without knowing that there are only 3 rows in the datatable)? TIA
  3. I have a listbox with a datasource and a display member, and i have found out that because of the data source, calling Listbox1.SelectedItem.tostring will always return System.Data.DataRowView So, how can i code this so it returns the test of the selecteditem?
  4. i feel like such an idiot. thanks alot
  5. This code doesnt seem to be working for adding a new record: Dim newcourse As Data.DataRow newcourse = NewCourse1.Tables(0).NewRow newcourse.Item("Name") = TextBox1.Text NewCourse1.Tables(0).Rows.Add(newcourse) NewCourse1.AcceptChanges() OleDbDataAdapter1.Update(NewCourse1, "Course") Why not? TIA
  6. OK, um... Sorry, I mean datatable, I'm not brand new to ADO.NET, sorry, "Syntax Error" on my part. Lol. So yeah I am populating the checkedlistbox from a datatable on a dataset. But I'm working with a relationship or a associative entity - in other words, the filled listbox is sorted by the ID Column in Table 1, (displaying a different column though) and my Relationship Entity is called Table1@Table2 or whatever. So I'm adding the Row to the Table1@Table2 table, but I need to figure out which position the checked item is in in the ListBox. THis would be relatively simple, but there is an opportunity to select multiple items. SO going back to my code, I'm using a loop... Dim item as object For Each item In CheckedBox1.SelectedItems *** Next I need to figure out the code for finding the current position in the listbox. My problem is theres no such thing as Dim item as CheckedListBoxItem So the code for finding the current position needs to go where the *** is above. On a different note, I see your in portugal; I'm portuguese! In fact my grandparents (who live in Cascais) were just here, (I live in America atm). TIA Adam
  7. Hi, this my first post, but: OK, I have a CheckedListbox being populated from a DataSet. I have the code: Dim item As Object For Each item In CheckedListBox1.SelectedItems Next Now, I want each item to be added to the DataSet based on its position in the ListBox. Obviously, I cant say newdatarow(0) = item.PositionInListBox So what can I do?
×
×
  • Create New...