Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SqlCommand.DerivedParameters( )
Message
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Divers
Thread ID:
00819180
Message ID:
00819398
Vues:
10
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform