Topaz Filer: if you use e-mail for business, we can save you money and decrease your risk.
DataSet - Update- Error
Messages   Related Types
This message was discovered on microsoft.public.dotnet.framework.adonet.


Kumar
I tried to update datasource (SQLServer) from a DataSet
using " OleDbAdapter.Update(DataSet,'table1') ". I have a
proper OledbTransaction object in place.

But I am getting the following error:

"Execute requires a transaction object when the connection
is in a pending local transaction."

Does any one know how to solve this error.

Thanks

- R.Kumar
Reply to this message...
Vote that this is a GOOD answer...
 
Auto-following on Twitter
Ubuntu and XP on one “desktop”
 
    
Hussein Abuthuraya(MSFT)
Hi R Kumar,

I don't have your code, but I think I know what is the problem here. It is possible that you forgot to associate the UpdateCommand with the transaction object.
To accomplish this, you need the following line:

SqlDataAdapter.UpdateCommand.Transaction = myTrans

I hope this helps!

Thanks,
Hussein Abuthuraya
Microsoft Visual Studio .NET Readiness Team

This posting is provided "AS IS" with no warranties, and confers no rights. You assume all risk for your use. © 2001 Microsoft Corporation. All rights reserved

Reply to this message...
Vote that this is a GOOD answer...
 
Outlook interop - stopping user properties appearing on Outlook message print
Seriously, why is “cut and paste” majorly newsworthy???
 
    
Kumar
Hi Hussein Abuthuraya

I have solved the problem. Thanks for the info.

- R.Kumar

[Original message clipped]

the UpdateCommand with the transaction object.
[Original message clipped]

2001 Microsoft Corporation. All rights reserved
>
Reply to this message...
Vote that this is a GOOD answer...
 
 
 
System.Data.DataSet
System.Data.SqlClient.SqlDataAdapter




Ad
BootFX
Reliable and powerful .NET application framework.
Recession Busting Bespoke Software
Get through the recession by investing in bespoke software to decrease costs and create commercial opportunities.
Other DN247 Network Sites
.NET 247
SQL Server Wins
Old Skool Developer
 
Copyright © AMX Software Ltd 2008-2009. Portions copyright © Matthew Baxter-Reynolds 2001-2009. All rights reserved.
Contact Us - Terms of Use - Privacy Policy - .NET 247 is a member of the DN247 Network - 4.0.30129.1734