DataAdapter.MissingSchemaAction Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Determines the action to take when existing DataSet schema does not match incoming data.
public:
property System::Data::MissingSchemaAction MissingSchemaAction { System::Data::MissingSchemaAction get(); void set(System::Data::MissingSchemaAction value); };
public System.Data.MissingSchemaAction MissingSchemaAction { get; set; }
[System.Data.DataSysDescription("DataAdapter_MissingSchemaAction")]
public System.Data.MissingSchemaAction MissingSchemaAction { get; set; }
member this.MissingSchemaAction : System.Data.MissingSchemaAction with get, set
[<System.Data.DataSysDescription("DataAdapter_MissingSchemaAction")>]
member this.MissingSchemaAction : System.Data.MissingSchemaAction with get, set
Public Property MissingSchemaAction As MissingSchemaAction
Property Value
One of the MissingSchemaAction values. The default is Add
.
Implements
- Attributes
Exceptions
The value set is not one of the MissingSchemaAction values.
Examples
The following example creates a derived class, OleDbDataAdapter and sets some of its properties.
// Assumes a valid connection string to an Access database.
static void CreateOleDbAdapter(string connectionString)
{
OleDbDataAdapter adapter = new OleDbDataAdapter();
adapter.SelectCommand =
new OleDbCommand("SELECT * FROM Categories ORDER BY CategoryID");
adapter.SelectCommand.Connection =
new OleDbConnection(connectionString);
adapter.MissingMappingAction = MissingMappingAction.Error;
adapter.MissingSchemaAction = MissingSchemaAction.Error;
}
' Assumes a valid connection string to an Access database.
Private Sub CreateOleDbDataAdapter(ByVal connectionString As String)
Dim adapter As New OleDbDataAdapter()
adapter.SelectCommand = _
New OleDbCommand("SELECT * FROM Categories ORDER BY CategoryID")
adapter.SelectCommand.Connection = New OleDbConnection _
(connectionString)
adapter.MissingMappingAction = MissingMappingAction.Error
adapter.MissingSchemaAction = MissingSchemaAction.Error
End Sub
Applies to
See also
GitHub पर हमारे साथ सहयोग करें
इस सामग्री का स्रोत GitHub पर पाया जा सकता है, जहाँ आप समस्याएँ बना और समीक्षा भी कर सकते हैं और अनुरोध खींच सकते हैं. अधिक जानकारी के लिए, हमारे योगदानकर्ता गाइड देखें.