DAC for MySQL

TMySQLQuery.Properties.ProcessComments

Previous Next

Allows to choose what kind of comments to cut from SQL query text before sending it to server.

Syntax:

property ProcessComments : TmySQLQueryProcessComments;

Description:

This property is a set values that determine what kinds of comments will be cutted from SQL query text before sending it to MySQL server. The following table describes possible comments styles:

TmySQLQueryProcessComments valueProcessed by defaultComments style
qpcMinusMinusyesAll symbols from '--' until end of string are cutted
qpcSharpnoAll symbols from '#' until end of string are cutted
qpcSlashAsteriskyesC-style comments are cutted. For example '/* this is comment */'

You can set ProcessComments to [] (empty set) to allow MySQL server to process all kind of comments by itself. But this can cause problems if you are using query params.(Params, ParamCheck, ParamCount properties).

This property can be very useful if your literal constants contains '--', '#', '/*' or '*/' symbols. Just set to remove appropritate value of TmySQLQueryProcessComments from ProcessComments property.
See also:Params property
ParamCheck property
ParamCount property