| 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; }
Public Property CommandText As Layout
Get
Set
Dim instance As DatabaseTarget
Dim value As Layout
value = instance.CommandText
instance.CommandText = value
member CommandText : Layout with get, set
Property Value
Type:
LayoutRemarks
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