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.1+cf6675da40ccfd4c8c526a3b2bdbeed3442910a1
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