Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SqlCommand.DerivedParameters( )
Message
General information
Forum:
ASP.NET
Category:
ADO.NET
Miscellaneous
Thread ID:
00819180
Message ID:
00819398
Views:
9
Bonnie,

Without you using DeriveParameters before setting the transaction, I don't think you will be able to do this. The problem is the method is static so it prevents using the DA associated with a CommandBuilder instance.

>Cathi,
>
>Well, I'm not using a DataAdapter in this particular case ... I'm saving changes with StoredProcs, not getting data, so I don't really need to use a DataAdapter. But anyway, this is what I tried but it still gives me the same error:
>
>Command.Parameters.Clear();
>SqlDataAdapter da = new SqlDataAdapter(Command);
>da.SelectCommand.Transaction = Command.Transaction;
>SqlCommandBuilder.DeriveParameters(Command);
>
>Did I do this wrong? Or maybe this isn't what you meant? Or maybe I'm an idiot? <g>
>
>
>~~Bonnie
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform