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.5.0+1873145cbc26e0312d9481234d69ce7dc68aac4e
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