Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SqlCommandBuilder class
Message
De
14/04/2014 11:58:02
 
 
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Versions des environnements
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01598513
Message ID:
01598597
Vues:
37
This message has been marked as a message which has helped to the initial question of the thread.
>>Try reading again.
>>"To generate INSERT, UPDATE, or DELETE statements, the SqlCommandBuilder uses the SelectCommand property to retrieve a required set of metadata automatically. If you change the SelectCommand after the metadata has been retrieved, such as after the first update, you should call the RefreshSchema method to update the metadata."
>
>I did read this line. However, it doesn't explain why will it use all columns to generate WHERE clause. What exactly does required metadata mean? Why it can not see that PK column I retrieve is a PK column?

Look at the ConflictOptions property (http://msdn.microsoft.com/en-us/library/system.data.common.dbcommandbuilder.conflictoption%28v=vs.110%29.aspx) and the options that that enumeration has (http://msdn.microsoft.com/en-us/library/system.data.conflictoption%28v=vs.110%29.aspx). You might also want to look at the SetAllValues property (http://msdn.microsoft.com/en-us/library/system.data.common.dbcommandbuilder.setallvalues%28v=vs.110%29.aspx).
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform