Click here to Skip to main content
15,899,825 members
Home / Discussions / C#
   

C#

 
GeneralRe: how to Merge two datatables in a dataset Pin
Russell Jones16-Mar-09 1:56
Russell Jones16-Mar-09 1:56 
QuestionAny idea why this error appears (SEH Exception) Pin
Matjaz-xyz16-Mar-09 1:31
Matjaz-xyz16-Mar-09 1:31 
AnswerRe: Any idea why this error appears (SEH Exception) Pin
Michael Bookatz16-Mar-09 1:38
Michael Bookatz16-Mar-09 1:38 
AnswerRe: Any idea why this error appears (SEH Exception) Pin
Giorgi Dalakishvili16-Mar-09 2:29
mentorGiorgi Dalakishvili16-Mar-09 2:29 
GeneralRe: Any idea why this error appears (SEH Exception) Pin
Matjaz-xyz17-Mar-09 3:35
Matjaz-xyz17-Mar-09 3:35 
QuestionApplication.Idle Event Pin
saksp16-Mar-09 0:02
saksp16-Mar-09 0:02 
AnswerRe: Application.Idle Event Pin
DaveyM6916-Mar-09 0:20
professionalDaveyM6916-Mar-09 0:20 
AnswerRe: Application.Idle Event Pin
#realJSOP16-Mar-09 2:34
professional#realJSOP16-Mar-09 2:34 
QuestionTransparent through the label Pin
CodingLover15-Mar-09 23:00
CodingLover15-Mar-09 23:00 
AnswerRe: Transparent through the label Pin
Christian Graus15-Mar-09 23:22
protectorChristian Graus15-Mar-09 23:22 
AnswerRe: Transparent through the label Pin
Wael Dalloul15-Mar-09 23:23
Wael Dalloul15-Mar-09 23:23 
AnswerRe: Transparent through the label Pin
Michael Bookatz15-Mar-09 23:41
Michael Bookatz15-Mar-09 23:41 
Questionhandle shorcut Ctrl+V event on AxWebBrowser Pin
sonukadole15-Mar-09 22:53
sonukadole15-Mar-09 22:53 
AnswerRe: handle shorcut Ctrl+V event on AxWebBrowser Pin
Pete O'Hanlon15-Mar-09 23:11
mvePete O'Hanlon15-Mar-09 23:11 
GeneralRe: handle shorcut Ctrl+V event on AxWebBrowser Pin
sonukadole15-Mar-09 23:15
sonukadole15-Mar-09 23:15 
GeneralRe: handle shorcut Ctrl+V event on AxWebBrowser Pin
Pete O'Hanlon15-Mar-09 23:26
mvePete O'Hanlon15-Mar-09 23:26 
GeneralRe: handle shorcut Ctrl+V event on AxWebBrowser Pin
sonukadole16-Mar-09 0:09
sonukadole16-Mar-09 0:09 
GeneralRe: handle shorcut Ctrl+V event on AxWebBrowser Pin
Pete O'Hanlon16-Mar-09 2:47
mvePete O'Hanlon16-Mar-09 2:47 
QuestionPreserving row pointer across an database update via a datatable Pin
jrgrobinson15-Mar-09 22:29
jrgrobinson15-Mar-09 22:29 
AnswerRe: Preserving row pointer across an database update via a datatable Pin
Wael Dalloul15-Mar-09 23:19
Wael Dalloul15-Mar-09 23:19 
GeneralRe: Preserving row pointer across an database update via a datatable Pin
jrgrobinson16-Mar-09 0:23
jrgrobinson16-Mar-09 0:23 
GeneralRe: Preserving row pointer across an database update via a datatable Pin
Wael Dalloul16-Mar-09 0:56
Wael Dalloul16-Mar-09 0:56 
AnswerRe: Preserving row pointer across an database update via a datatable Pin
Mycroft Holmes15-Mar-09 23:25
professionalMycroft Holmes15-Mar-09 23:25 
GeneralRe: Preserving row pointer across an database update via a datatable Pin
jrgrobinson16-Mar-09 0:19
jrgrobinson16-Mar-09 0:19 
AnswerRe: Preserving row pointer across an database update via a datatable Pin
jrgrobinson16-Mar-09 1:44
jrgrobinson16-Mar-09 1:44 
Just to close it off for prosperity.

I have a data table, filled by a table adapter with '...WHERE(PK=@PK)'. It had a single row in it. I added another row (.NewRow, .AddRow). The Rows count of the table was 2. Index [0] pointed to the old origional data. Index [1] pointed to the new data, DataRowState=Added.

I then called the table adapter.update (a rather large INSERT statement)

There was still a count of two rows but both [0] and [1] pointed to the same row, the origional. This would indicate the data table of the dataset is no longer valid after an Update. I then did another fill and the data table had both rows as before (now unchanged state).

The reason for writing this is to record for other people that may fall into this minor but time consuming trap. The tableAdapter.Update call is the end of the road for the validity of the data table data. There isn't a lot of documentation or web resource that tells you this.

It maybe obvious to seasoned .NET database engineers, and maybe standard practice. It would be unexpected to new entrants in this field with experience of other, dare I say it, more normal, caching systems.

Thanks for the help.

Ooops, I modified Table Adapter to refer more correctly to the data table of the dataset where referring to storage.

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.