468,484 Members | 2,113 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,484 developers. It's quick & easy.

Transaction error

Hi all,
i have a problem with a transaction.i will tray to explain my problem.
i have a Dataset that i have fill using 2 DataAdapter with a simple query
( all tables with an autonumber).

i have made code for the dataadapter rowupdate to get the @@identity of my
table.
everything works fine.

now is the problem,
i have made a transaction to made this works,
when i do the endcurrent edit of my CurrencyManager, i want to submit the
row to the DataBase.
i have submited the first table and works fine
when i try to submit the second table it throws an exception.
after that every thing is ok

but when i press again the save button
when im going to submit the first table again it throws an cocurrency
violation, and the row state
of the row that im try to submit have changed the rowstate from Added to
Modified. anyone knows why ??

thsk
JSB

plsea see the code below
so i have made some thing like this

'update Function
dim cmd as SQlClient.CommandBulider ( DataAdapter)
dim cmd1 as SQlClient.CommandBulider ( DataAdapter2)
try

BD.Open
trans = bd.BeginTransaction

DataAdapter.update ( Ds,Table)
' some code that mades a error
' bla bla bla
' in this peace of code ocurs an Error that throws an Exception
DataAdapter2.update ( Ds,Table2)

trans.comit
catch
trans.rollback
finally
bd.close
end try
Nov 20 '05 #1
0 687

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Sam | last post: by
10 posts views Thread by TZoner | last post: by
2 posts views Thread by Dano | last post: by
1 post views Thread by Matik | last post: by
1 post views Thread by cricketweb | last post: by
2 posts views Thread by gieforce | last post: by
reply views Thread by theflame83 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.