Navigation:  Advantage .NET Data Provider > AdsCommandBuilder Class > AdsCommandBuilder Methods >

AdsCommandBuilder.GetDeleteCommand

Advantage .NET Data Provider

Previous pageReturn to chapter overviewNext page

Gets the automatically generated AdsCommand object required to perform deletions on the database when an application calls AdsDataAdapter.Update.

public AdsCommand GetDeleteCommand();

Remarks

An application can use the GetDeleteCommand method for informational or troubleshooting purposes because it returns the AdsCommand object to be executed.

You can also use GetDeleteCommand as the basis of a modified command. For example, you might call GetDeleteCommand during development to quickly produce a DELETE statement and then use that statement directly in your application rather than using the AdsCommandBuilder in the released application.

After the SQL statement is first generated, the application must explicitly call AdsCommandBuilder.RefreshSchema if it changes the statement in any way. Otherwise, the GetDeleteCommand will be still be using information from the previous statement, which might not be correct. The SQL statements are first generated either when the application calls Update or GetDeleteCommand.