When might you use the ToTable() method on a DataView in ADO.NET?
- When you want to create a new DataTable from the DataView
- When you want to add a new table to the DataSet
- When you want to convert the DataView to an array
- When you want to remove duplicate rows from the DataView
The correct option is option 1, When you want to create a new DataTable from the DataView. The ToTable() method in ADO.NET is used to generate a new DataTable containing the same data as the DataView. This is helpful when you need to work with the DataView's data in a DataTable format for further processing or manipulation.
Loading...
Related Quiz
- What is the purpose of the "DataSource" property in DataGrid or DataGridView controls?
- What is the significance of the CommandType property in an ADO.NET command object?
- What is EF in the context of ADO.NET Entity Framework?
- Which ADO.NET class is commonly used to execute non-query commands?
- Which ADO.NET data reader is used specifically for working with SQL Server databases?