Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Initializes a new instance of the SqlCeDataAdapter class with a SelectCommand and a SqlCeConnection object.
Namespace: System.Data.SqlServerCe
Assembly: System.Data.SqlServerCe (in system.data.sqlserverce.dll)
Syntax
'Declaration
Public Sub New ( _
selectCommandText As String, _
selectConnection As SqlCeConnection _
)
public SqlCeDataAdapter (
string selectCommandText,
SqlCeConnection selectConnection
)
public:
SqlCeDataAdapter (
String^ selectCommandText,
SqlCeConnection^ selectConnection
)
public SqlCeDataAdapter (
String selectCommandText,
SqlCeConnection selectConnection
)
public function SqlCeDataAdapter (
selectCommandText : String,
selectConnection : SqlCeConnection
)
Parameters
- selectCommandText
A String that is an SQL SELECT statement to be used as the CommandText of the SelectCommand property of the SqlCeDataAdapter.
- selectConnection
A SqlCeConnection that represents the connection.
Remarks
This implementation of the SqlCeDataAdapter opens and closes a SqlCeConnection if it is not already open. This can be useful in an application that must call the Fill method for two or more SqlCeDataAdapter objects. If the SqlCeConnection is already open, you must explicitly call Close or Dispose to close it.
When you create an instance of SqlCeDataAdapter, the following read/write properties are set to the following initial values.
Properties |
Initial Value |
MissingMappingAction.Passthrough |
|
MissingSchemaAction.Add |
You can change the value of any of these properties by making a separate call to that property.
Example
The following example creates a SqlCeDataAdapter by passing the command string and a SqlCeConnection object.
Platforms
Development Platforms
Windows Vista, Windows Mobile 5.0, Windows XP Professional with Service Pack 2 (SP2), Windows Server 2003, Windows Mobile 2003 for Pocket PC, Windows CE 5.0
Version Information
.NET Framework and NET Compact Framework
Supported in 3.5
.NET Framework
Supported in 3.0
.NET Compact Framework and .Net Framework
Supported in 2.0
See Also
Reference
SqlCeDataAdapter Class
SqlCeDataAdapter Members
System.Data.SqlServerCe Namespace
MissingMappingAction
MissingSchemaAction