D
Dwaine
Using .NET Framework 1.1.
I do a select for a row, assign a strongly typed var to
reference/change the row thuought the rest of the code(OrigRow).
After various responses from the user that change some column values
of OrigRow, I begin a transaction and select(By PK) for the row again
to bring it into the transaction. I use the strongly typed NewRow
method of the datatable and assign it to another variable(NewRow) to
add a new row based on some of the user responses.
Right after the newrow method is executed, the column values of both
OrigRow and NewRow change to the original db values of OrigRow!!!???
DA.Fill(DS.DT) 'select *
OrigRow as DTRow = DT.rows(0)
'here, OrigRow.Qty = 10
.....
do some work,
OrigRow.Qty += 10 'proposed value = 20
....
'now work is done, start a transaction...
conn.open
conn.BeginTransaction
'change cmd obj for PK
DA.Fill(DS.DT) 'select where ID = OrigRow.ID, assigned to Txn
'In retrospect, shouldn't this reset values of OrigRow? Another
thread!
'now create a new row for another reason
NewRow as DTRow = DT.NewRow
'RIGHT HERE, OrigRow Values AND NewRow Values change to pre-work
values of OrigRow!!!!???? e.g., OrigRow.Qty = 10 AND NewRow.Qty = 10,
NOT NULL!!??
Anybody else see this or able to explain what I'm seeing, I'm going
CRAZY!
Thanks for any help,
Dwaine
I do a select for a row, assign a strongly typed var to
reference/change the row thuought the rest of the code(OrigRow).
After various responses from the user that change some column values
of OrigRow, I begin a transaction and select(By PK) for the row again
to bring it into the transaction. I use the strongly typed NewRow
method of the datatable and assign it to another variable(NewRow) to
add a new row based on some of the user responses.
Right after the newrow method is executed, the column values of both
OrigRow and NewRow change to the original db values of OrigRow!!!???
DA.Fill(DS.DT) 'select *
OrigRow as DTRow = DT.rows(0)
'here, OrigRow.Qty = 10
.....
do some work,
OrigRow.Qty += 10 'proposed value = 20
....
'now work is done, start a transaction...
conn.open
conn.BeginTransaction
'change cmd obj for PK
DA.Fill(DS.DT) 'select where ID = OrigRow.ID, assigned to Txn
'In retrospect, shouldn't this reset values of OrigRow? Another
thread!
'now create a new row for another reason
NewRow as DTRow = DT.NewRow
'RIGHT HERE, OrigRow Values AND NewRow Values change to pre-work
values of OrigRow!!!!???? e.g., OrigRow.Qty = 10 AND NewRow.Qty = 10,
NOT NULL!!??
Anybody else see this or able to explain what I'm seeing, I'm going
CRAZY!
Thanks for any help,
Dwaine