Tornado Class Library

Special Topic - Property Keyword Delimiter

Delimiters are used to separate various keywords values in the ASPdb.Net property statements. Due to the fact that keyword values can practically contain any characters, it is necessary to allow the user to customize them. For example -

dbproperty="a,b,c,d"

Here, comma is used to separate the a,b,c and d values. If one of them is a SQL statement like SELECT Field1, Field2 from TABLE, then comma cannot be used to delimit them any more. We have to do something like -

dbProperty="(;~)a ~ b ~ SELECT Field1, Field2 from TABLE ~ d"

You may redefine or override the standard parameter delimiters used within ASPdb.Net properties. This is accomplished within the property statement itself by specifying the delimiters that you want to use right at the beginning. Just put the delimiters inside parenthesis and then you may use those delimiters in the rest of the statement. The general form is:

X.dbProperty = (;,~)FixedParam=Val ; parm1=val1 | parm2=val2 ; parm1a=val1a~b~c | parm2a=val2a~b~c

If (abc) is present, then 'a' is the group delimiter, in this case a semi-colon, 'b' is the field delimiter, in this case a comma, and 'c' is the optional delimiter, in this case a slash. For example, say parm1 is a company name like Jones, Inc. . You would need to be able to include a comma in the parameter meaning you wouldn t be able to use a comma for a delimiter anymore. You should do this instead:

X.dbProperty = (;|/) Ford | Nike | Jones, Inc. ; Cars | Shoes | Hats

A group delimiter delimits the fixed Parameterss from the repeating ones while field delimiter delimits the repeating groups and the global delimiter delimits the Parm=Value within each field.

The one property that needs the most attention is the dbMagicCell. The standard delimiters are (;,[]#|~/+{}). If the values contain one of these characters, the the delimiter has to be changed like Format=[$###,###]. This property conflicts the "#" and "," delimiter. So if this format is used the delimiters should be changed to something like (;^[]%|~/+{}).

All properties with no delimiter prefix defaults to (;,) - group =; and field = ,  

 

Example

 


Send comments on this topic.
Copyright 1998-2006 ASP-db