Click or drag to resize

DatabaseTargetCommandText Property

Gets or sets the text of the SQL command to be run on each log level.

Namespace:  NLog.Targets
Assembly:  NLog.Database (in NLog.Database.dll) Version: 5.3.4+73d83d3161d31288ca5c554cc50d27b6bed5f28b
Syntax
public Layout CommandText { get; set; }

Property Value

Type: Layout
Remarks
Typically this is a SQL INSERT statement or a stored procedure call. It should use the database-specific parameters (marked as @parameter for SQL server or :parameter for Oracle, other data providers have their own notation) and not the layout renderers, because the latter is prone to SQL injection attacks. The layout renderers should be specified as <parameter /> elements instead.
See Also