HighTechTalks DotNet Forums  

TableAdapters and Transactions again!

Dotnet Framework (ADO.net) microsoft.public.dotnet.framework.adonet


Discuss TableAdapters and Transactions again! in the Dotnet Framework (ADO.net) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #11  
Old   
Miha Markic
 
Posts: n/a

Default Re: multi table adapter - 05-22-2007 , 04:02 AM






You should use transaction..
--
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

"rekha anand" wrote in message news:20075220227rekhaba (AT) hotmail (DOT) com...
Quote:
Hi Andrew,
I tried your solution as you suggested. My second adapter is failing and
my first adapter is still getting updated in the database and not getting
rolled back. For example, I have one header row and 3 details row. When
the 3rd row of the detail is failing it is not rolling back the entire
transaction. Instead a row is added in the header table and 2 rows are
added in the detail table.

Please advise as how to overcome this issue.

I am using XSD generated strong type dataset and multi table adapter.I
modified the code with partial classes as you suggested.

Please let me know if you need any additional information.

Thanks,
Rekha

EggHeadCafe.com - .NET Developer Portal of Choice
http://www.eggheadcafe.com


Reply With Quote
  #12  
Old   
moniq
 
Posts: n/a

Default sql transaction with table adapter - 11-27-2007 , 01:59 AM






Hi,

I have tried your solution on my project. There are four tables in sql server 2005 express, that form a tree (table1 has foreign key to table2, table2 to table3, and table3 to table4)

Firstly, I insert into table4, then table3, table2 and last table1. But when inserting into table1, trouble arise as it stated time out

"Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding."

When I change the sql table relation (enforce foreign key constraint to "no") for the last table(table1). it works alright, but it's not what I want to ( it didn't check the integrity)

Please advise
Thanks, appriciate all reply

Sincerely,

Moniq

EggHeadCafe - .NET Developer Portal of Choice
http://www.eggheadcafe.com

Reply With Quote
  #13  
Old   
moniq
 
Posts: n/a

Default sql transaction with table adapter - 11-27-2007 , 02:02 AM



Hi,

I have tried your solution on my project. There are four tables in sql server 2005 express, that form a tree (table1 has foreign key to table2, table2 to table3, and table3 to table4)

Firstly, I insert into table4, then table3, table2 and last table1. But when inserting into table1, trouble arise as it stated time out

"Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding."

When I change the sql table relation (enforce foreign key constraint to "no") for the last table(table1). it works alright, but it's not what I want to ( it didn't check the integrity)

Please advise
Thanks, appriciate all reply

Sincerely,

Moniq

EggHeadCafe - .NET Developer Portal of Choice
http://www.eggheadcafe.com

Reply With Quote
  #14  
Old   
moniq angel
 
Posts: n/a

Default sql transaction with table adapter - 11-27-2007 , 02:34 AM



Hi,

I have tried your solution on my project. There are four tables in sql server 2005 express, that form a tree (table1 has foreign key to table2, table2 to table3, and table3 to table4)

Firstly, I insert into table4, then table3, table2 and last table1. But when inserting into table1, trouble arise as it stated time out

"Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding."

When I change the sql table relation (enforce foreign key constraint to "no") for the last table(table1). it works alright, but it's not what I want to ( it didn't check the integrity)

Please advise
Thanks, appreciate all reply

Sincerely,

Moniq

EggHeadCafe - .NET Developer Portal of Choice
http://www.eggheadcafe.com

Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.