View Single Post
  #10 (permalink)  
Old 12-02-2008, 9:54 AM
cjard's Avatar
cjard cjard is offline
VB.NET Forum All-Mighty
.NET Framework: .NET 2.0 (VS 2005)
 
Join Date: Apr 2006
Age: 65
Posts: 6,442
Reputation: 807
cjard has a reputation beyond reputecjard has a reputation beyond reputecjard has a reputation beyond reputecjard has a reputation beyond reputecjard has a reputation beyond reputecjard has a reputation beyond reputecjard has a reputation beyond reputecjard has a reputation beyond reputecjard has a reputation beyond reputecjard has a reputation beyond reputecjard has a reputation beyond repute
Default

OK, well the option may be greyed out because:

It is not available, or
It always happens and you cannot turn it off

I'd have expected unticked-greyed in the former and ticked-greyed in the latter. However, we can answer this question more directly:

Put a breakpoint on the line BEFORE you call Update. Look at the row values using the dataset visualizer (highlight datatable variable, point to it, click magnifying glass in the tooltip). You see your normal autonumber from the DATASET, right?

Now step over the Update (point of note: youre Update() the ORIGINAL datatable, NOT the copy that GetChanges gives you, right? Do not use GetChanges()!)

Now look at the datatable visualizer again. Crucial question: Did the value change (to the autonumber from the DB) or not?


If your DB is blank or empty then PLEASE DONT START your dataset autonumber from the SAME seed as the DB! (For the reason that if the DS calc an ID of 1, and then the DB also calcs 1, it wont look like it changed. Use a seed of -1 and a step of -1 in the dataset if needs be)
__________________
DW1 DW2 DW3 DW4 DNU PQ
Reply With Quote