Gets or sets the name of the current DataSet.
[Visual Basic] Public Property DataSetName As String [C#] public string DataSetName {get; set;} [C++] public: __property String* get_DataSetName(); public: __property void set_DataSetName(String*); [JScript] public function get DataSetName() : String; public function set DataSetName(String);
The name of the DataSet.
[Visual Basic, C#] The following example creates a new DataSet with the given DataSetName.
[Visual Basic] Private Sub CreateDataSet() Dim myDataSet As DataSet myDataSet = New DataSet("SuppliersProducts") Console.WriteLine(myDataSet.DataSetName) End Sub [C#] private void CreateDataSet(){ DataSet myDataSet = new DataSet("SuppliersProducts"); Console.WriteLine(myDataSet.DataSetName); // Add a DataTable. myDataSet.Tables.Add(new DataTable("Suppliers")); // Add a DataColumn to the DataTable. myDataSet.Tables["Suppliers"].Columns.Add (new DataColumn("CompanyName", System.Type.GetType("System.String"))); }
[C++, JScript] No example is available for C++ or JScript. To view a Visual Basic or C# example, click the Language Filter button
in the upper-left corner of the page.
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework - Windows CE .NET
DataSet Class | DataSet Members | System.Data Namespace | DataSet