combit List & Label 25 - .NET Online Web Help
ExecuteDbCommand Event (DbCommandSetDataProvider)

combit.ListLabel25.DataProviders Namespace > DbCommandSetDataProvider Class : ExecuteDbCommand Event
This event allows to edit the DbCommand before it is executed on the database.
Public Event ExecuteDbCommand As EventHandler(Of ExecuteDbCommandEventArgs)
public event EventHandler<ExecuteDbCommandEventArgs> ExecuteDbCommand
event EventHandler<ExecuteDbCommandEventArgs^>^ ExecuteDbCommand
Event Data

The event handler receives an argument of type ExecuteDbCommandEventArgs containing data related to this event. The following ExecuteDbCommandEventArgs properties provide information specific to this event.

The IDbCommand instance which is to be executed on the database. You can e.g. edit the SQL statement or change the parameter values.  
void MyCommandDataSetProvider_ExecuteDbCommand(object sender, ExecuteDbCommandEventArgs e)
  e.Command.CommandText = e.Command.CommandText.Replace("*", "[Address], [CustomerName], [City]");
Private Sub MyCommandDataSetProvider_ExecuteDbCommand(sender As Object, e As ExecuteDbCommandEventArgs)
	e.Command.CommandText = e.Command.CommandText.Replace("*", "[Address], [CustomerName], [City]")
End Sub

Platforms: Windows 7 SP1 - Windows 10 Version 1909, Windows Server 2008 R2 - 2019

See Also