 | 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: 6.0.0+be83582280f7a841b0d3c6ae75b4f95aaf07e914
Syntaxpublic 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:
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