EPUB | CHM | PDF

TMySQLQuery.Properties.ProcessComments

Top 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 deleted from SQL query text before sending it to MySQL server. The following table describes possible comments styles:

TMySQLQueryProcessComments value

Processed by default

Comments style

qpcMinusMinus

yes

All symbols from '--' until end of string are truncated.

qpcSharp

no

All symbols from '#' until end of string are truncated.

qpcSlashAsterisk

yes

C-style comments are truncated. 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).

note This property can be very useful if your literal constants contains '--', '#', '/*' or '*/' symbols. Just set to remove appropriate value of TMySQLQueryProcessComments from ProcessComments property.

See also: Params property, ParamCheck property, ParamCount property