Click here to Skip to main content
15,896,527 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# ComboBox Questions Pin
jdnx1-Apr-06 1:27
jdnx1-Apr-06 1:27 
GeneralRe: C# ComboBox Questions Pin
jdnx1-Apr-06 21:07
jdnx1-Apr-06 21:07 
QuestionToolStripTextBox Pin
Sean8931-Mar-06 12:14
Sean8931-Mar-06 12:14 
AnswerRe: ToolStripTextBox Pin
ricardojb31-Mar-06 19:57
ricardojb31-Mar-06 19:57 
AnswerRe: ToolStripTextBox Pin
Ed.Poore31-Mar-06 22:16
Ed.Poore31-Mar-06 22:16 
GeneralRe: ToolStripTextBox Pin
Sean891-Apr-06 2:54
Sean891-Apr-06 2:54 
GeneralRe: ToolStripTextBox Pin
Ed.Poore1-Apr-06 8:48
Ed.Poore1-Apr-06 8:48 
QuestionDataSet.HasChanges won't become True Pin
MohammadAmiry31-Mar-06 11:42
MohammadAmiry31-Mar-06 11:42 
hi, I have a dataset, DataSet1, populated from a database table named "Sections" which is bounded to DataGrid1.
I want to remove a row if a user selects it in the datagrid and presses the remove button. here is the vb-code (I actually have my code in VB, but as you know, there is no difference:

Private Sub cmdRemove_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdRemove.Click 
If DataGrid1.CurrentRowIndex >= 0 Then            
  DataSet1.Tables("Sections").Rows.Remove(DataSet1.Tables("Sections").Rows(DataGrid1.CurrentRowIndex))
  MessageBox.Show(DataSet1.HasChanges)
  OleDbDataAdapterSections.Update(DataSet1, "Sections")  
  DataSet1.AcceptChanges()  
End If    
End Sub



But messagebox shows False, and the row is not actually removed from the database, ALTHOUGH DataGrid1 shows that the row has removed from dataset!

(I use the same method i.e. DataSet1...Rows.Add(..) and then the oleDbDataAdapterSections.Update(..) to add rows which works perfectly!! But the added rows are not removed using the same code from the database...)

I really dunno the reason and got confused!


-- modified at 17:50 Friday 31st March, 2006
AnswerRe: DataSet.HasChanges won't become True Pin
Jimbo221-Apr-06 1:40
Jimbo221-Apr-06 1:40 
GeneralRe: DataSet.HasChanges won't become True Pin
MohammadAmiry1-Apr-06 5:20
MohammadAmiry1-Apr-06 5:20 
GeneralRe: DataSet.HasChanges won't become True Pin
Jimbo221-Apr-06 22:52
Jimbo221-Apr-06 22:52 
GeneralRe: DataSet.HasChanges won't become True Pin
MohammadAmiry2-Apr-06 10:12
MohammadAmiry2-Apr-06 10:12 
Questionfind tool in text editor Pin
abdelhameed8131-Mar-06 11:25
abdelhameed8131-Mar-06 11:25 
QuestionStreaming JPEG data into a PDF file Pin
alstroemeria31-Mar-06 10:58
alstroemeria31-Mar-06 10:58 
AnswerRe: Streaming JPEG data into a PDF file Pin
MarkInNH31-Mar-06 11:31
MarkInNH31-Mar-06 11:31 
GeneralRe: Streaming JPEG data into a PDF file Pin
alstroemeria31-Mar-06 12:01
alstroemeria31-Mar-06 12:01 
GeneralRe: Streaming JPEG data into a PDF file Pin
MarkInNH3-Apr-06 13:02
MarkInNH3-Apr-06 13:02 
QuestionC# VS.2005 application deployment help Pin
BambooMoon31-Mar-06 10:44
BambooMoon31-Mar-06 10:44 
AnswerRe: C# VS.2005 application deployment help Pin
Ed.Poore1-Apr-06 8:50
Ed.Poore1-Apr-06 8:50 
GeneralRe: C# VS.2005 application deployment help Pin
BambooMoon2-Apr-06 7:14
BambooMoon2-Apr-06 7:14 
GeneralRe: C# VS.2005 application deployment help Pin
Ed.Poore2-Apr-06 9:08
Ed.Poore2-Apr-06 9:08 
QuestionHow to put a .gif picture in word doc. using c#? Pin
JuJAngel31-Mar-06 10:20
JuJAngel31-Mar-06 10:20 
QuestionTotally Beginner Question.. Updating SQL Server DB. Pin
HopefulCoder31-Mar-06 9:06
HopefulCoder31-Mar-06 9:06 
AnswerRe: Totally Beginner Question.. Updating SQL Server DB. Pin
xvaughan31-Mar-06 9:09
xvaughan31-Mar-06 9:09 
GeneralRe: Totally Beginner Question.. Updating SQL Server DB. Pin
HopefulCoder31-Mar-06 9:21
HopefulCoder31-Mar-06 9:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.