No I do not have a lot of constraints.
I created a second table with the same construction. But with this one I
did not try to FILL from my SQL Server database. When I add the row (as
before) I do not get the delay.
So now I know the delay is when I try to FILL the dataset and there are
no records. My first column is an IDENTITY column which I use so I can
use the UPDATE command from the dataset. When I am adding the row {using
command: dsorder.Tables("PaymentsAndCredits").rows.add(oRow )} to the
datatable I am not using this IDENTITY column (since I do not know its
value).
With my test datatable (the one I just created) I can use DBNULL.VALUE
or just leave off the entire column and I have no problem. The row adds.
(I guess this is because we never tried to place an identity value or
primary key value in this column.) Then after I add the row and UPDATE
the database, SQL Server will autofill the next value.
Jon, What can I do with the first column (the IDENTITY column) without
a value? Or is there a way I can FILL my datatable without using this
IDENTITY column and still UPDATE any changes?
I hope this is clear. Thanks.
Eric.
Jon Skeet [C# MVP] wrote:
Eric Petruzzelli <eg*@e-globalpartners.com> wrote:
It is running on my laptop, nothing wrong there. This is the only bottle
neck. And 2 seconds is not an exaggeration.
It occurs on the line:
dsorder.Tables("PaymentsAndCredits").rows.add(oR Ow)
It only happens with the first row. I redid my SQL Insert, Delete stmts
in case there was a dataType change. Nothing.
Do you have a lot of constraints involved which check other tables? Do
you get a similar hit if you just create the dataset from scratch
without involving the database anywhere, just adding simple columns?