SqlCeCommandBuilder.GetUpdateCommand Method
Note: This namespace, class, or member is supported only in version 1.1 of the .NET Framework.
Gets the automatically generated SqlCeCommand object required to perform updates on the database when an application calls Update on the SqlCeDataAdapter.
[Visual Basic] Public Function GetUpdateCommand() As SqlCeCommand [C#] public SqlCeCommand GetUpdateCommand(); [C++] public: SqlCeCommand* GetUpdateCommand(); [JScript] public function GetUpdateCommand() : SqlCeCommand;
Return Value
The automatically generated SqlCeCommand object required to perform updates.
Remarks
An application can use the GetUpdateCommand method for informational or troubleshooting purposes because it returns the SqlCeCommand object to be executed.
You can also use GetUpdateCommand as the basis of a modified command. For example, you might call GetUpdateCommand, modify one of its properties, and then explicitly set that on the SqlCeDataAdapter.
After the SQL statement is first generated, the application must explicitly call RefreshSchema if the application changes the SQL statement in any way. Otherwise, the GetUpdateCommand still uses information from the previous statement, and that information might not be correct. The SQL statements are first generated when the application calls either Update or GetUpdateCommand.
Requirements
Platforms: .NET Compact Framework
.NET Framework Security:
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries From Partially Trusted Code
See Also
SqlCeCommandBuilder Class | SqlCeCommandBuilder Members | System.Data.SqlServerCe Namespace
Syntax based on .NET Framework version 1.1.
Documentation version 1.1.1.