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

C#

 
AnswerRe: Reports every Monday at 7am. Pin
Le centriste25-May-09 7:18
Le centriste25-May-09 7:18 
AnswerRe: Reports every Monday at 7am. Pin
_Maxxx_25-May-09 12:27
professional_Maxxx_25-May-09 12:27 
GeneralRe: Reports every Monday at 7am. Pin
Jacob Dixon25-May-09 15:26
Jacob Dixon25-May-09 15:26 
AnswerRe: Reports every Monday at 7am. Pin
Jacob Dixon25-May-09 15:36
Jacob Dixon25-May-09 15:36 
GeneralRe: Reports every Monday at 7am. Pin
_Maxxx_25-May-09 19:05
professional_Maxxx_25-May-09 19:05 
QuestionPop ContextMenu on NotifyIcon without mouse activity Pin
jackgeek25-May-09 5:58
jackgeek25-May-09 5:58 
QuestionRe: Pop ContextMenu on NotifyIcon without mouse activity Pin
jackgeek29-May-09 12:23
jackgeek29-May-09 12:23 
QuestionNeed help with TableAdapter problem [modified] Pin
kensai25-May-09 5:01
kensai25-May-09 5:01 
Solved: I realized I'm a huge dummy and forgot a transaction I wrapped around delete operation. Turns out I forgot to add a trans.Complete() at the end of it. I added it and problem solved.

I have a typed DataSet mapping a local SQL Server CE 3.5 .sdf file using DataGridView on a WinForm. I can successfully add and modify data but for some reason I can't delete any. I don't get any errors either. Can you please give me any ideas about what could be wrong? I can't figure this out and I'd appreciate any help.

I use simple methods like this:

fill
myTableTableAdapter.Fill(myDataSet.MyTable);


add
(after adding new row to grid also to bindingsource)
myTableTableAdapter.Update(myDataSet.MyTable);


delete
myDataSet.MyTableRow row = myDataSet.MyTable.FindByID(id);
row.Delete();
myTableTableAdapter.Update(myDataSet.MyTable);


The row is gone from gridview. I also check myDataSet.MyTable parameter in myTableTableAdapter.Update(myDataSet.MyTable) using debug visualizer, it's is gone from there too (row status: Deleted). But when I refill data from database, it's back like nothing happend..

I checked DeleteCommand of the myTableTableAdapter, it is defined and correct.

I don't copy project database file over the newer build file either.

I wrote a simple log to see the rowstatus of the row. Everything seems to work as it should but still the row comes back after a db refill:

Log: row status: Unchanged
Log: calling row.Delete()
Log: row status: Deleted
Log: entering Update() function
Log: row status: Deleted
Log: calling tableAdapter.Update(dataset.Table)
Log: row status: row not found in dataset


Any ideas?

modified on Tuesday, May 26, 2009 6:12 AM

AnswerRe: Need help with TableAdapter problem Pin
Fahad Sadah25-May-09 7:28
Fahad Sadah25-May-09 7:28 
GeneralRe: Need help with TableAdapter problem Pin
kensai25-May-09 23:48
kensai25-May-09 23:48 
AnswerRe: Need help with TableAdapter problem Pin
kensai26-May-09 0:13
kensai26-May-09 0:13 
QuestionFile types Pin
viciouskinid25-May-09 4:13
viciouskinid25-May-09 4:13 
AnswerRe: File types Pin
harold aptroot25-May-09 4:44
harold aptroot25-May-09 4:44 
GeneralRe: File types Pin
viciouskinid25-May-09 5:17
viciouskinid25-May-09 5:17 
GeneralRe: File types Pin
harold aptroot25-May-09 5:31
harold aptroot25-May-09 5:31 
GeneralRe: File types Pin
viciouskinid25-May-09 7:07
viciouskinid25-May-09 7:07 
GeneralRe: File types Pin
harold aptroot25-May-09 7:28
harold aptroot25-May-09 7:28 
GeneralRe: File types Pin
viciouskinid25-May-09 8:19
viciouskinid25-May-09 8:19 
GeneralRe: File types Pin
harold aptroot25-May-09 8:35
harold aptroot25-May-09 8:35 
GeneralRe: File types Pin
viciouskinid25-May-09 10:19
viciouskinid25-May-09 10:19 
GeneralRe: File types Pin
harold aptroot25-May-09 10:42
harold aptroot25-May-09 10:42 
GeneralRe: File types Pin
viciouskinid25-May-09 19:05
viciouskinid25-May-09 19:05 
GeneralRe: File types Pin
harold aptroot25-May-09 23:42
harold aptroot25-May-09 23:42 
GeneralRe: File types Pin
viciouskinid26-May-09 7:02
viciouskinid26-May-09 7:02 
GeneralRe: File types Pin
harold aptroot26-May-09 7:13
harold aptroot26-May-09 7:13 

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.