DataSet Classe
Définition
Représente un cache en mémoire des données.Represents an in-memory cache of data.
public ref class DataSet : System::ComponentModel::MarshalByValueComponent, System::ComponentModel::IListSource, System::ComponentModel::ISupportInitialize, System::ComponentModel::ISupportInitializeNotification, System::Runtime::Serialization::ISerializable, System::Xml::Serialization::IXmlSerializable
public ref class DataSet : System::ComponentModel::MarshalByValueComponent, System::ComponentModel::IListSource, System::ComponentModel::ISupportInitialize, System::Runtime::Serialization::ISerializable, System::Xml::Serialization::IXmlSerializable
public ref class DataSet : System::ComponentModel::MarshalByValueComponent, System::ComponentModel::IListSource, System::ComponentModel::ISupportInitializeNotification, System::Runtime::Serialization::ISerializable, System::Xml::Serialization::IXmlSerializable
public class DataSet : System.ComponentModel.MarshalByValueComponent, System.ComponentModel.IListSource, System.ComponentModel.ISupportInitialize, System.ComponentModel.ISupportInitializeNotification, System.Runtime.Serialization.ISerializable, System.Xml.Serialization.IXmlSerializable
[System.Serializable]
public class DataSet : System.ComponentModel.MarshalByValueComponent, System.ComponentModel.IListSource, System.ComponentModel.ISupportInitialize, System.Runtime.Serialization.ISerializable, System.Xml.Serialization.IXmlSerializable
[System.Serializable]
public class DataSet : System.ComponentModel.MarshalByValueComponent, System.ComponentModel.IListSource, System.ComponentModel.ISupportInitializeNotification, System.Runtime.Serialization.ISerializable, System.Xml.Serialization.IXmlSerializable
public class DataSet : System.ComponentModel.MarshalByValueComponent, System.ComponentModel.IListSource, System.ComponentModel.ISupportInitializeNotification, System.Runtime.Serialization.ISerializable, System.Xml.Serialization.IXmlSerializable
type DataSet = class
inherit MarshalByValueComponent
interface IListSource
interface ISupportInitialize
interface ISupportInitializeNotification
interface ISerializable
interface IXmlSerializable
[<System.Serializable>]
type DataSet = class
inherit MarshalByValueComponent
interface IListSource
interface IXmlSerializable
interface ISupportInitialize
interface ISerializable
[<System.Serializable>]
type DataSet = class
inherit MarshalByValueComponent
interface IListSource
interface IXmlSerializable
interface ISupportInitializeNotification
interface ISupportInitialize
interface ISerializable
[<System.Serializable>]
type DataSet = class
inherit MarshalByValueComponent
interface IListSource
interface IXmlSerializable
interface ISupportInitializeNotification
interface ISerializable
interface ISupportInitialize
Public Class DataSet
Inherits MarshalByValueComponent
Implements IListSource, ISerializable, ISupportInitialize, ISupportInitializeNotification, IXmlSerializable
Public Class DataSet
Inherits MarshalByValueComponent
Implements IListSource, ISerializable, ISupportInitialize, IXmlSerializable
Public Class DataSet
Inherits MarshalByValueComponent
Implements IListSource, ISerializable, ISupportInitializeNotification, IXmlSerializable
- Héritage
- Attributs
- Implémente
Exemples
L’exemple suivant est constitué de plusieurs méthodes qui, combinées, créent et remplissent une DataSet à partir de la base de données Northwind .The following example consists of several methods that, combined, create and fill a DataSet from the Northwind database.
using System;
using System.Data;
using System.Data.SqlClient;
namespace Microsoft.AdoNet.DataSetDemo
{
class NorthwindDataSet
{
static void Main()
{
string connectionString = GetConnectionString();
ConnectToData(connectionString);
}
private static void ConnectToData(string connectionString)
{
//Create a SqlConnection to the Northwind database.
using (SqlConnection connection =
new SqlConnection(connectionString))
{
//Create a SqlDataAdapter for the Suppliers table.
SqlDataAdapter adapter = new SqlDataAdapter();
// A table mapping names the DataTable.
adapter.TableMappings.Add("Table", "Suppliers");
// Open the connection.
connection.Open();
Console.WriteLine("The SqlConnection is open.");
// Create a SqlCommand to retrieve Suppliers data.
SqlCommand command = new SqlCommand(
"SELECT SupplierID, CompanyName FROM dbo.Suppliers;",
connection);
command.CommandType = CommandType.Text;
// Set the SqlDataAdapter's SelectCommand.
adapter.SelectCommand = command;
// Fill the DataSet.
DataSet dataSet = new DataSet("Suppliers");
adapter.Fill(dataSet);
// Create a second Adapter and Command to get
// the Products table, a child table of Suppliers.
SqlDataAdapter productsAdapter = new SqlDataAdapter();
productsAdapter.TableMappings.Add("Table", "Products");
SqlCommand productsCommand = new SqlCommand(
"SELECT ProductID, SupplierID FROM dbo.Products;",
connection);
productsAdapter.SelectCommand = productsCommand;
// Fill the DataSet.
productsAdapter.Fill(dataSet);
// Close the connection.
connection.Close();
Console.WriteLine("The SqlConnection is closed.");
// Create a DataRelation to link the two tables
// based on the SupplierID.
DataColumn parentColumn =
dataSet.Tables["Suppliers"].Columns["SupplierID"];
DataColumn childColumn =
dataSet.Tables["Products"].Columns["SupplierID"];
DataRelation relation =
new System.Data.DataRelation("SuppliersProducts",
parentColumn, childColumn);
dataSet.Relations.Add(relation);
Console.WriteLine(
"The {0} DataRelation has been created.",
relation.RelationName);
}
}
static private string GetConnectionString()
{
// To avoid storing the connection string in your code,
// you can retrieve it from a configuration file.
return "Data Source=(local);Initial Catalog=Northwind;"
+ "Integrated Security=SSPI";
}
}
}
Option Explicit On
Option Strict On
Imports System.Data
Imports system.Data.SqlClient
Public Class NorthwindDataSet
Public Shared Sub Main()
Dim connectionString As String = _
GetConnectionString()
ConnectToData(connectionString)
End Sub
Private Shared Sub ConnectToData( _
ByVal connectionString As String)
' Create a SqlConnection to the Northwind database.
Using connection As SqlConnection = New SqlConnection( _
connectionString)
' Create a SqlDataAdapter for the Suppliers table.
Dim suppliersAdapter As SqlDataAdapter = _
New SqlDataAdapter()
' A table mapping names the DataTable.
suppliersAdapter.TableMappings.Add("Table", "Suppliers")
' Open the connection.
connection.Open()
Console.WriteLine("The SqlConnection is open.")
' Create a SqlCommand to retrieve Suppliers data.
Dim suppliersCommand As New SqlCommand( _
"SELECT SupplierID, CompanyName FROM dbo.Suppliers;", _
connection)
suppliersCommand.CommandType = CommandType.Text
' Set the SqlDataAdapter's SelectCommand.
suppliersAdapter.SelectCommand = suppliersCommand
' Fill the DataSet.
Dim dataSet As New DataSet("Suppliers")
suppliersAdapter.Fill(dataSet)
' Create a second SqlDataAdapter and SqlCommand to get
' the Products table, a child table of Suppliers.
Dim productsAdapter As New SqlDataAdapter()
productsAdapter.TableMappings.Add("Table", "Products")
Dim productsCommand As New SqlCommand( _
"SELECT ProductID, SupplierID FROM dbo.Products;", _
connection)
productsAdapter.SelectCommand = productsCommand
' Fill the DataSet.
productsAdapter.Fill(dataSet)
' Close the connection.
connection.Close()
Console.WriteLine("The SqlConnection is closed.")
' Create a DataRelation to link the two tables
' based on the SupplierID.
Dim parentColumn As DataColumn = _
dataSet.Tables("Suppliers").Columns("SupplierID")
Dim childColumn As DataColumn = _
dataSet.Tables("Products").Columns("SupplierID")
Dim relation As New DataRelation("SuppliersProducts", _
parentColumn, childColumn)
dataSet.Relations.Add(relation)
Console.WriteLine( _
"The {0} DataRelation has been created.", _
relation.RelationName)
End Using
End Sub
Private Shared Function GetConnectionString() As String
' To avoid storing the connection string in your code,
' you can retrieve it from a configuration file.
Return "Data Source=(local);Initial Catalog=Northwind;" _
& "Integrated Security=SSPI;"
End Function
End Class
Remarques
DataSet, Qui est un cache en mémoire des données récupérées à partir d’une source de données, est un composant majeur de l’architecture ADO.net.The DataSet, which is an in-memory cache of data retrieved from a data source, is a major component of the ADO.NET architecture. Le DataSet se compose d’une collection d' DataTable objets que vous pouvez lier entre eux à l’aide d' DataRelation objets.The DataSet consists of a collection of DataTable objects that you can relate to each other with DataRelation objects. Vous pouvez également appliquer l’intégrité des données dans le à l' DataSet aide des UniqueConstraint ForeignKeyConstraint objets et.You can also enforce data integrity in the DataSet by using the UniqueConstraint and ForeignKeyConstraint objects. Pour plus d’informations sur l’utilisation des DataSet objets, consultez jeux de données, DataTables et DataView.For further details about working with DataSet objects, see DataSets, DataTables, and DataViews.
Tandis que DataTable les objets contiennent les données, DataRelationCollection vous permet de naviguer dans la hiérarchie de la table.Whereas DataTable objects contain the data, the DataRelationCollection allows you to navigate though the table hierarchy. Les tables sont contenues dans un DataTableCollection accessible via la Tables propriété.The tables are contained in a DataTableCollection accessed through the Tables property. Lors de l’accès aux DataTable objets, Notez qu’ils respectent la casse de manière conditionnelle.When accessing DataTable objects, note that they are conditionally case sensitive. Par exemple, s’il s’agit d’un DataTable nom nommé « Mydatatable » et un autre nommé « Mydatatable », une chaîne utilisée pour Rechercher l’une des tables est considérée comme sensible à la casse.For example, if one DataTable is named "mydatatable" and another is named "Mydatatable", a string used to search for one of the tables is regarded as case sensitive. Toutefois, si « Mydatatable » existe et que « Mydatatable » ne le fait pas, la chaîne recherchée est considérée comme ne respectant pas la casse.However, if "mydatatable" exists and "Mydatatable" does not, the search string is regarded as case insensitive. Pour plus d’informations sur l’utilisation des DataTable objets, consultez création d’un DataTable.For more information about working with DataTable objects, see Creating a DataTable.
Un DataSet peut lire et écrire des données et un schéma sous forme de documents XML.A DataSet can read and write data and schema as XML documents. Les données et le schéma peuvent ensuite être transportées sur HTTP et utilisées par n’importe quelle application, sur n’importe quelle plateforme prenant en charge XML.The data and schema can then be transported across HTTP and used by any application, on any platform that is XML-enabled. Vous pouvez enregistrer le schéma en tant que schéma XML à l’aide de la WriteXmlSchema méthode, et le schéma et les données peuvent être enregistrés à l’aide de la WriteXml méthode.You can save the schema as an XML schema with the WriteXmlSchema method, and both schema and data can be saved using the WriteXml method. Pour lire un document XML qui comprend à la fois le schéma et les données, utilisez la ReadXml méthode.To read an XML document that includes both schema and data, use the ReadXml method.
Dans une implémentation à plusieurs niveaux classique, les étapes de création et d’actualisation d’un et, à DataSet son tour, de mise à jour des données d’origine sont les suivantes :In a typical multiple-tier implementation, the steps for creating and refreshing a DataSet, and in turn, updating the original data are to:
Générez et remplissez chaque DataTable dans une DataSet avec les données d’une source de données à l’aide d’un DataAdapter .Build and fill each DataTable in a DataSet with data from a data source using a DataAdapter.
Modifiez les données d' DataTable objets individuels en ajoutant, en mettant à jour ou en supprimant des DataRow objets.Change the data in individual DataTable objects by adding, updating, or deleting DataRow objects.
Appelez la GetChanges méthode pour créer une seconde DataSet qui ne contient que les modifications apportées aux données.Invoke the GetChanges method to create a second DataSet that features only the changes to the data.
Appelez la Update méthode de la méthode DataAdapter , en passant la seconde DataSet comme argument.Call the Update method of the DataAdapter, passing the second DataSet as an argument.
Appelez la Merge méthode pour fusionner les modifications de la seconde DataSet avec la première.Invoke the Merge method to merge the changes from the second DataSet into the first.
Appelez le AcceptChanges sur le DataSet .Invoke the AcceptChanges on the DataSet. Vous pouvez également appeler RejectChanges pour annuler les modifications.Alternatively, invoke RejectChanges to cancel the changes.
Notes
Les DataSet DataTable objets et héritent de MarshalByValueComponent et prennent en charge l' ISerializable interface pour la communication à distance.The DataSet and DataTable objects inherit from MarshalByValueComponent, and support the ISerializable interface for remoting. Ce sont les seuls objets ADO.NET qui peuvent être exécutés à distance.These are the only ADO.NET objects that can be remoted.
Notes
Les classes héritées de DataSet ne sont pas finalisées par le garbage collector, car le finaliseur a été supprimé dans DataSet .Classes inherited from DataSet are not finalized by the garbage collector, because the finalizer has been suppressed in DataSet. La classe dérivée peut appeler la ReRegisterForFinalize méthode dans son constructeur pour permettre à la classe d’être finalisée par le garbage collector.The derived class can call the ReRegisterForFinalize method in its constructor to allow the class to be finalized by the garbage collector.
Considérations relatives à la sécuritéSecurity considerations
Pour plus d’informations sur la sécurité des DataSets et des tables de données, consultez Guide de sécurité.For information about DataSet and DataTable security, see Security guidance.
Constructeurs
DataSet() |
Initialise une nouvelle instance de la classe DataSet.Initializes a new instance of the DataSet class. |
DataSet(SerializationInfo, StreamingContext) |
Initialise une nouvelle instance d'une classe DataSet qui contient les informations de sérialisation et le contexte donnés.Initializes a new instance of a DataSet class that has the given serialization information and context. |
DataSet(SerializationInfo, StreamingContext, Boolean) |
Initialise une nouvelle instance de la classe DataSet.Initializes a new instance of the DataSet class. |
DataSet(String) |
Initialise une nouvelle instance d'une classe DataSet portant le nom donné.Initializes a new instance of a DataSet class with the given name. |
Propriétés
CaseSensitive |
Obtient ou définit une valeur indiquant si les comparaisons de chaînes au sein d'objets DataTable respectent la casse.Gets or sets a value indicating whether string comparisons within DataTable objects are case-sensitive. |
Container |
Obtient le conteneur du composant.Gets the container for the component. (Hérité de MarshalByValueComponent) |
DataSetName |
Obtient ou définit le nom du DataSet en cours.Gets or sets the name of the current DataSet. |
DefaultViewManager |
Obtient une vue personnalisée des données contenues dans le DataSet, permettant de filtrer, rechercher et naviguer à l'aide d'un DataViewManager personnalisé.Gets a custom view of the data contained in the DataSet to allow filtering, searching, and navigating using a custom DataViewManager. |
DesignMode |
Obtient une valeur indiquant si le composant est actuellement en mode design.Gets a value indicating whether the component is currently in design mode. (Hérité de MarshalByValueComponent) |
EnforceConstraints |
Obtient ou définit une valeur indiquant si les règles de contrainte doivent être respectées lorsque vous tentez une opération de mise à jour.Gets or sets a value indicating whether constraint rules are followed when attempting any update operation. |
Events |
Obtient la liste des gestionnaires d'événements attachés à ce composant.Gets the list of event handlers that are attached to this component. (Hérité de MarshalByValueComponent) |
ExtendedProperties |
Obtient la collection d'informations utilisateur personnalisées associée au |
HasErrors |
Obtient une valeur indiquant s'il existe des erreurs dans les objets DataTable de ce DataSet.Gets a value indicating whether there are errors in any of the DataTable objects within this DataSet. |
IsInitialized |
Obtient une valeur qui indique si DataSet est initialisé.Gets a value that indicates whether the DataSet is initialized. |
Locale |
Obtient ou définit les paramètres régionaux utilisés pour comparer des chaînes dans la table.Gets or sets the locale information used to compare strings within the table. |
Namespace |
Obtient ou définit l'espace de noms de DataSet.Gets or sets the namespace of the DataSet. |
Prefix |
Obtient ou définit un préfixe XML qui associe un alias à l'espace de noms de DataSet.Gets or sets an XML prefix that aliases the namespace of the DataSet. |
Relations |
Obtient la collection des relations qui relient les tables et permettent de naviguer des tables parentes aux tables enfants.Gets the collection of relations that link tables and allow navigation from parent tables to child tables. |
RemotingFormat |
Obtient ou définit un SerializationFormat pour le DataSet utilisé pendant la communication à distance.Gets or sets a SerializationFormat for the DataSet used during remoting. |
SchemaSerializationMode |
Obtient ou définit un SchemaSerializationMode pour un DataSet.Gets or sets a SchemaSerializationMode for a DataSet. |
Site |
Obtient ou définit un élément ISite pour l'élément DataSet.Gets or sets an ISite for the DataSet. |
Tables |
Obtient la collection des tables contenues dans le DataSet.Gets the collection of tables contained in the DataSet. |
Méthodes
AcceptChanges() |
Valide toutes les modifications apportées à ce DataSet depuis son chargement ou depuis le dernier appel à AcceptChanges().Commits all the changes made to this DataSet since it was loaded or since the last time AcceptChanges() was called. |
BeginInit() |
Commence l'initialisation d'un DataSet qui est utilisé dans un formulaire ou par un autre composant.Begins the initialization of a DataSet that is used on a form or used by another component. L'initialisation se produit au moment de l'exécution.The initialization occurs at run time. |
Clear() |
Efface toutes les données de DataSet en supprimant toutes les lignes de l'ensemble des tables.Clears the DataSet of any data by removing all rows in all tables. |
Clone() |
Copie la structure de DataSet, y compris tous les schémas, relations et contraintes DataTable.Copies the structure of the DataSet, including all DataTable schemas, relations, and constraints. Ne copie aucune donnée.Does not copy any data. |
Copy() |
Copie à la fois la structure et les données de ce DataSet.Copies both the structure and data for this DataSet. |
CreateDataReader() |
Retourne un DataTableReader avec un jeu de résultats par DataTable, dans la même séquence que les tables dans la collection Tables.Returns a DataTableReader with one result set per DataTable, in the same sequence as the tables appear in the Tables collection. |
CreateDataReader(DataTable[]) |
Retourne un DataTableReader avec un jeu de résultats par DataTable.Returns a DataTableReader with one result set per DataTable. |
DetermineSchemaSerializationMode(SerializationInfo, StreamingContext) |
Détermine le SchemaSerializationMode pour un DataSet.Determines the SchemaSerializationMode for a DataSet. |
DetermineSchemaSerializationMode(XmlReader) |
Détermine le SchemaSerializationMode pour un DataSet.Determines the SchemaSerializationMode for a DataSet. |
Dispose() |
Libère toutes les ressources utilisées par MarshalByValueComponent.Releases all resources used by the MarshalByValueComponent. (Hérité de MarshalByValueComponent) |
Dispose(Boolean) |
Libère les ressources non managées utilisées par MarshalByValueComponent et libère éventuellement les ressources managées.Releases the unmanaged resources used by the MarshalByValueComponent and optionally releases the managed resources. (Hérité de MarshalByValueComponent) |
EndInit() |
Termine l'initialisation d'un DataSet qui est utilisé dans un formulaire ou par un autre composant.Ends the initialization of a DataSet that is used on a form or used by another component. L'initialisation se produit au moment de l'exécution.The initialization occurs at run time. |
Equals(Object) |
Détermine si l'objet spécifié est égal à l'objet actuel.Determines whether the specified object is equal to the current object. (Hérité de Object) |
GetChanges() |
Obtient une copie du DataSet qui contient l'ensemble des modifications qui lui ont été apportées depuis son chargement ou depuis le dernier appel à AcceptChanges().Gets a copy of the DataSet that contains all changes made to it since it was loaded or since AcceptChanges() was last called. |
GetChanges(DataRowState) |
Obtient une copie du DataSet contenant l'ensemble des modifications qui lui ont été apportées depuis son dernier chargement ou depuis l'appel à AcceptChanges(), filtrée par DataRowState.Gets a copy of the DataSet containing all changes made to it since it was last loaded, or since AcceptChanges() was called, filtered by DataRowState. |
GetDataSetSchema(XmlSchemaSet) |
Obtient une copie de XmlSchemaSet pour le DataSet.Gets a copy of XmlSchemaSet for the DataSet. |
GetHashCode() |
Fait office de fonction de hachage par défaut.Serves as the default hash function. (Hérité de Object) |
GetObjectData(SerializationInfo, StreamingContext) |
Remplit un objet d’informations de sérialisation avec les données nécessaires pour sérialiser DataSet.Populates a serialization information object with the data needed to serialize the DataSet. |
GetSchemaSerializable() |
Retourne une instance sérialisable de XmlSchema.Returns a serializable XmlSchema instance. |
GetSerializationData(SerializationInfo, StreamingContext) |
Désérialise les données de table du flux binaire ou de données XML.Deserializes the table data from the binary or XML stream. |
GetService(Type) |
Obtient l'implémenteur du IServiceProvider.Gets the implementer of the IServiceProvider. (Hérité de MarshalByValueComponent) |
GetType() |
Obtient le Type de l'instance actuelle.Gets the Type of the current instance. (Hérité de Object) |
GetXml() |
Retourne la représentation XML des données stockées dans le DataSet.Returns the XML representation of the data stored in the DataSet. |
GetXmlSchema() |
Retourne le schéma XML de la représentation XML des données stockées dans le DataSet.Returns the XML Schema for the XML representation of the data stored in the DataSet. |
HasChanges() |
Obtient une valeur indiquant si DataSet contient des modifications, notamment des lignes nouvelles, supprimées ou modifiées.Gets a value indicating whether the DataSet has changes, including new, deleted, or modified rows. |
HasChanges(DataRowState) |
Obtient une valeur indiquant si DataSet contient des modifications, notamment des lignes nouvelles, supprimées ou modifiées, filtrées par DataRowState.Gets a value indicating whether the DataSet has changes, including new, deleted, or modified rows, filtered by DataRowState. |
InferXmlSchema(Stream, String[]) |
Applique le schéma XML à partir du Stream spécifié à DataSet.Applies the XML schema from the specified Stream to the DataSet. |
InferXmlSchema(String, String[]) |
Applique le schéma XML à partir du fichier spécifié du DataSet.Applies the XML schema from the specified file to the DataSet. |
InferXmlSchema(TextReader, String[]) |
Applique le schéma XML à partir du TextReader spécifié à DataSet.Applies the XML schema from the specified TextReader to the DataSet. |
InferXmlSchema(XmlReader, String[]) |
Applique le schéma XML à partir du XmlReader spécifié à DataSet.Applies the XML schema from the specified XmlReader to the DataSet. |
InitializeDerivedDataSet() |
Désérialisez toutes les données de tables du DataSet du flux binaire ou de données XML.Deserialize all of the tables data of the DataSet from the binary or XML stream. |
IsBinarySerialized(SerializationInfo, StreamingContext) |
Inspecte le format de la représentation sérialisée de |
Load(IDataReader, LoadOption, DataTable[]) |
Remplit un DataSet avec des valeurs issues d'une source de données, à l'aide du IDataReader fourni, en utilisant un tableau d'instances de DataTable pour fournir les informations de schéma et d'espace de noms.Fills a DataSet with values from a data source using the supplied IDataReader, using an array of DataTable instances to supply the schema and namespace information. |
Load(IDataReader, LoadOption, FillErrorEventHandler, DataTable[]) |
Remplit un DataSet avec des valeurs issues d'une source de données, à l'aide du IDataReader fourni, en utilisant un tableau d'instances de DataTable pour fournir les informations de schéma et d'espace de noms.Fills a DataSet with values from a data source using the supplied IDataReader, using an array of DataTable instances to supply the schema and namespace information. |
Load(IDataReader, LoadOption, String[]) |
Remplit un DataSet avec des valeurs issues d'une source de données, à l'aide du IDataReader fourni, en utilisant un tableau de chaînes pour fournir les noms des tables dans le |
MemberwiseClone() |
Crée une copie superficielle du Object actuel.Creates a shallow copy of the current Object. (Hérité de Object) |
Merge(DataRow[]) |
Fusionne un tableau d'objets DataRow dans le DataSet en cours.Merges an array of DataRow objects into the current DataSet. |
Merge(DataRow[], Boolean, MissingSchemaAction) |
Fusionne un tableau d'objets DataRow dans le DataSet en cours, en préservant ou en supprimant les modifications apportées au |
Merge(DataSet) |
Fusionne un DataSet spécifié et son schéma dans le |
Merge(DataSet, Boolean) |
Fusionne un DataSet spécifié et son schéma dans le |
Merge(DataSet, Boolean, MissingSchemaAction) |
Fusionne un DataSet spécifié et son schéma avec le |
Merge(DataTable) |
Fusionne un DataTable spécifié et son schéma dans le DataSet en cours.Merges a specified DataTable and its schema into the current DataSet. |
Merge(DataTable, Boolean, MissingSchemaAction) |
Fusionne un DataTable spécifié et son schéma dans le |
OnPropertyChanging(PropertyChangedEventArgs) |
Déclenche l’événement OnPropertyChanging(PropertyChangedEventArgs).Raises the OnPropertyChanging(PropertyChangedEventArgs) event. |
OnRemoveRelation(DataRelation) |
Se produit lorsqu'un objet DataRelation est supprimé de DataTable.Occurs when a DataRelation object is removed from a DataTable. |
OnRemoveTable(DataTable) |
Se produit lorsqu'un DataTable est supprimé de DataSet.Occurs when a DataTable is removed from a DataSet. |
RaisePropertyChanging(String) |
Envoie une notification indiquant que la propriété DataSet spécifiée est sur le point d'être modifiée.Sends a notification that the specified DataSet property is about to change. |
ReadXml(Stream) |
Lit le schéma et les données XML dans le DataSet à l'aide du Stream spécifié.Reads XML schema and data into the DataSet using the specified Stream. |
ReadXml(Stream, XmlReadMode) |
Lit le schéma et les données XML dans le DataSet à l'aide des Stream et XmlReadMode spécifiés.Reads XML schema and data into the DataSet using the specified Stream and XmlReadMode. |
ReadXml(String) |
Lit le schéma et les données XML dans le DataSet à l'aide du fichier spécifié.Reads XML schema and data into the DataSet using the specified file. |
ReadXml(String, XmlReadMode) |
Lit le schéma et les données XML dans le DataSet à l'aide du fichier et du XmlReadMode spécifiés.Reads XML schema and data into the DataSet using the specified file and XmlReadMode. |
ReadXml(TextReader) |
Lit le schéma et les données XML dans le DataSet à l'aide du TextReader spécifié.Reads XML schema and data into the DataSet using the specified TextReader. |
ReadXml(TextReader, XmlReadMode) |
Lit le schéma et les données XML dans le DataSet à l'aide des TextReader et XmlReadMode spécifiés.Reads XML schema and data into the DataSet using the specified TextReader and XmlReadMode. |
ReadXml(XmlReader) |
Lit le schéma et les données XML dans le DataSet à l'aide du XmlReader spécifié.Reads XML schema and data into the DataSet using the specified XmlReader. |
ReadXml(XmlReader, XmlReadMode) |
Lit le schéma et les données XML dans le DataSet à l'aide des XmlReader et XmlReadMode spécifiés.Reads XML schema and data into the DataSet using the specified XmlReader and XmlReadMode. |
ReadXmlSchema(Stream) |
Lit le schéma XML à partir du Stream spécifié dans le DataSet.Reads the XML schema from the specified Stream into the DataSet. |
ReadXmlSchema(String) |
Lit le schéma XML à partir du fichier spécifié dans le DataSet.Reads the XML schema from the specified file into the DataSet. |
ReadXmlSchema(TextReader) |
Lit le schéma XML à partir du TextReader spécifié dans le DataSet.Reads the XML schema from the specified TextReader into the DataSet. |
ReadXmlSchema(XmlReader) |
Lit le schéma XML à partir du XmlReader spécifié dans le DataSet.Reads the XML schema from the specified XmlReader into the DataSet. |
ReadXmlSerializable(XmlReader) |
Ignore les attributs et retourne un DataSet vide.Ignores attributes and returns an empty DataSet. |
RejectChanges() |
Restaure toutes les modifications apportées à DataSet depuis sa création ou le dernier appel à AcceptChanges().Rolls back all the changes made to the DataSet since it was created, or since the last time AcceptChanges() was called. |
Reset() |
Efface toutes les tables et supprime toutes les relations, contraintes étrangères et tables du DataSet.Clears all tables and removes all relations, foreign constraints, and tables from the DataSet. Les sous-classes doivent substituer Reset() pour rétablir l'état d'origine de DataSet.Subclasses should override Reset() to restore a DataSet to its original state. |
ShouldSerializeRelations() |
Obtient une valeur indiquant si la propriété Relations doit être rendue persistante.Gets a value indicating whether Relations property should be persisted. |
ShouldSerializeTables() |
Obtient une valeur indiquant si la propriété Tables doit être rendue persistante.Gets a value indicating whether Tables property should be persisted. |
ToString() |
Retourne un String contenant le nom du Component, s’il en existe un.Returns a String containing the name of the Component, if any. Cette méthode ne doit pas être remplacée.This method should not be overridden. (Hérité de MarshalByValueComponent) |
WriteXml(Stream) |
Écrit les données en cours de DataSet à l'aide du Stream spécifié.Writes the current data for the DataSet using the specified Stream. |
WriteXml(Stream, XmlWriteMode) |
Écrit les données en cours, et éventuellement le schéma, de DataSet à l'aide des Stream et XmlWriteMode spécifiés.Writes the current data, and optionally the schema, for the DataSet using the specified Stream and XmlWriteMode. Pour écrire le schéma, affectez |
WriteXml(String) |
Écrit les données en cours de DataSet dans le fichier spécifié.Writes the current data for the DataSet to the specified file. |
WriteXml(String, XmlWriteMode) |
Écrit les données en cours, et éventuellement le schéma, de DataSet dans le fichier spécifié à l'aide du XmlWriteMode spécifié.Writes the current data, and optionally the schema, for the DataSet to the specified file using the specified XmlWriteMode. Pour écrire le schéma, affectez |
WriteXml(TextWriter) |
Écrit les données en cours de DataSet à l'aide du TextWriter spécifié.Writes the current data for the DataSet using the specified TextWriter. |
WriteXml(TextWriter, XmlWriteMode) |
Écrit les données en cours, et éventuellement le schéma, de DataSet à l'aide des TextWriter et XmlWriteMode spécifiés.Writes the current data, and optionally the schema, for the DataSet using the specified TextWriter and XmlWriteMode. Pour écrire le schéma, affectez |
WriteXml(XmlWriter) |
Écrit les données en cours de DataSet dans le XmlWriter spécifié.Writes the current data for the DataSet to the specified XmlWriter. |
WriteXml(XmlWriter, XmlWriteMode) |
Écrit les données en cours, et éventuellement le schéma, de DataSet à l'aide des XmlWriter et XmlWriteMode spécifiés.Writes the current data, and optionally the schema, for the DataSet using the specified XmlWriter and XmlWriteMode. Pour écrire le schéma, affectez |
WriteXmlSchema(Stream) |
Écrit la structure DataSet en tant que schéma XML dans l’objet Stream spécifié.Writes the DataSet structure as an XML schema to the specified Stream object. |
WriteXmlSchema(Stream, Converter<Type,String>) |
Écrit la structure DataSet en tant que schéma XML dans l’objet Stream spécifié.Writes the DataSet structure as an XML schema to the specified Stream object. |
WriteXmlSchema(String) |
Écrit la structure DataSet sous la forme d'un schéma XML dans un fichier.Writes the DataSet structure as an XML schema to a file. |
WriteXmlSchema(String, Converter<Type,String>) |
Écrit la structure DataSet sous la forme d'un schéma XML dans un fichier.Writes the DataSet structure as an XML schema to a file. |
WriteXmlSchema(TextWriter) |
Écrit la structure DataSet en tant que schéma XML dans l’objet TextWriter spécifié.Writes the DataSet structure as an XML schema to the specified TextWriter object. |
WriteXmlSchema(TextWriter, Converter<Type,String>) |
Écrit la structure de DataSet sous la forme d'un schéma XML dans le TextWriter spécifié.Writes the DataSet structure as an XML schema to the specified TextWriter. |
WriteXmlSchema(XmlWriter) |
Écrit la structure DataSet sous la forme d'un schéma XML dans un objet XmlWriter.Writes the DataSet structure as an XML schema to an XmlWriter object. |
WriteXmlSchema(XmlWriter, Converter<Type,String>) |
Écrit la structure de DataSet sous la forme d'un schéma XML dans le XmlWriter spécifié.Writes the DataSet structure as an XML schema to the specified XmlWriter. |
Événements
Disposed |
Ajoute un gestionnaire d'événements pour écouter l'événement Disposed sur le composant.Adds an event handler to listen to the Disposed event on the component. (Hérité de MarshalByValueComponent) |
Initialized |
Se produit une fois que le DataSet est initialisé.Occurs after the DataSet is initialized. |
MergeFailed |
Se produit lorsque des DataRow cible et source possèdent la même valeur de clé primaire et que EnforceConstraints a la valeur true.Occurs when a target and source DataRow have the same primary key value, and EnforceConstraints is set to true. |
Implémentations d’interfaces explicites
IListSource.ContainsListCollection |
Pour obtenir une description de ce membre, consultez ContainsListCollection.For a description of this member, see ContainsListCollection. |
IListSource.GetList() |
Pour obtenir une description de ce membre, consultez GetList().For a description of this member, see GetList(). |
ISerializable.GetObjectData(SerializationInfo, StreamingContext) |
Remplit un objet d’informations de sérialisation avec les données nécessaires pour sérialiser DataSet.Populates a serialization information object with the data needed to serialize the DataSet. |
IXmlSerializable.GetSchema() |
Pour obtenir une description de ce membre, consultez GetSchema().For a description of this member, see GetSchema(). |
IXmlSerializable.ReadXml(XmlReader) |
Pour obtenir une description de ce membre, consultez ReadXml(XmlReader).For a description of this member, see ReadXml(XmlReader). |
IXmlSerializable.WriteXml(XmlWriter) |
Pour obtenir une description de ce membre, consultez WriteXml(XmlWriter).For a description of this member, see WriteXml(XmlWriter). |
S’applique à
Cohérence de thread
Ce type est sécurisé pour les opérations de lecture multithread.This type is safe for multithreaded read operations. Vous devez synchroniser toutes les opérations d’écriture.You must synchronize any write operations.