You are here: AxTools > CodeSMART 2007 for VB6 > Documentation > User's Guide > Code Builders > The Long/SQL String Builder
While browsing this page, why not start downloading the evaluation setup kit (direct download, no questions asked).

The Long/SQL String Builder

There are times when you may have a very long string and you want it to be formatted on multiple lines for better readability. Using this CodeSMART tool, you can quickly create the string and the variable that holds it, you can specify the maximum line length and you can obtain a new formatted string. The generated code block can be then copied into the memory or inserted into the Code window at the desired position.
The CodeSMART Long/SQL String Builder tool can also be used in formatting simple SQL strings (certain SQL directives are supported: SELECT, UPDATE and DELETE).

In order to format your strings, CodeSMART offers three split types:

  • Treat as standard text: This option is used to format regular strings. The string splitting is made when the maximum line length is encountered.
  • Split at each SQL clause: CodeSMART will split the SQL string on each SQL clause or when maximum line length is encountered.
  • Split at each SQL clause and clause parameter: CodeSMART will split the SQL string on each SQL clause or SQL clause parameter, or when maximum line length is encountered.
To format a string using the Long/SQL String Builder:

  1. Open the code module where you want to insert the formatted string.
  2. Select New Long/SQL String entry in the CodeSMART main menu in order to display the New Long/SQL String dialog box (quick menu reference is available).
    Long/SQL String Builder
  3. Start typing the string that you want to format in the corresponding text box. As you type or make any changes between the dialog options, CodeSMART displays in the Preview text box the formatted string according with the last chosen options.
  4. Specify the maximum line length for the formatted string (only values between 60 and 200 are considered to be valid).
  5. Optionally, you can add a variable that will hold the string and you can also provide the variable definition.
  6. Select the split type you want to use for the typed string, by choosing it from the Split Type combo box.
  7. In order to ensure a better readability, you can add indentation to SQL strings, using the corresponding check box.
  8. Use the Copy command button in order to copy the resulted string into the memory.
  9. Press Insert in order to insert the formatted string into the Code window and then automatically close the dialog box.
See also
Code Builders Overview
The Method Builder
The Property Builder
The Collection Class Builder
Switch Assignment Values

Back To Top

Copyright © 2008 AxTools - CodeSMART 2007 for VB6 - Code Builders