Causes of parsing failure in model generation

C# Model Generator parses DataWindows according to their SRD files and then generates C# models. The following cases may result in parsing failure, which means that model cannot be successfully generated from a DataWindow.

Database Connection

  • If you connect to Oracle database, it is strongly recommended that you use Oracle 12c or later.

DataWindow

DataWindow types that may resulting in parsing failure include:

  • Composite, Crosstab, OLE, and RichText

  • Nested reports

DropDownDWs that may result in parsing failure include:

  • A DropDownDW sets itself as its DataWindow object

DataWindow Column

Column types that may result in parsing failure include:

  • (If it is SQL Server connection) Datetime2

  • Char(-1) being the column type

Column names/dbnames that may result in parsing failure include:

  • Contain some database reserved words, for example, USER, NAME (reserved word in Oracle)

  • A column has duplicated name with the DataWindow that it belongs (This is a limitation in C# development: member names cannot be the same as their enclosing type.)

  • Case-insensitive duplicate dbnames.

Column initial values that may result in parsing failure if:

  • The initial value of a column is not empty, null, spaces, Today, or a constant of the correct type

DataWindow SQL

Elements in SQL syntax that may result in parsing failure include:

  • SQLCA.DBParm parameters (including DelimitIdentifier, TrimSpaces, StaticBind, DisableBind) are ignored in the model generation. Therefore, if the SQL syntax itself is incompatible with the DBMS, there may be parsing error. For example, if you access SQL Anywhere or Oracle, you cannot use single quotes to enclose table and column names in the SQL syntax.

  • Contain comments

  • Contain key words such as WITH, SET, DECLARE, EXECUTE

  • Contain user defined function(s)

  • Contain (‘*=’) operator

  • Use double bars (“||”) for concatenation

  • Contain SELECT Distinct COL1 but COL1 is text type

  • Complex SQL sub-queries or nested queries. For example, IF ... then select ... else if ... then select ... else select ... end if

  • (If the data source is a stored procedure) A parameter in the stored procedure is not declared but is assigned with a value.

  • A default value is directly assigned to an argument in the SQL. For example, TABLE(... arguments=(("a_plant", string, "test"),("a_return", string)) )

  • Missing spaces between words. Such as, missing a space after the SELECT DISTINCT keyword (for example, SELECT Distinct”audit”.”p_lname”); missing a space between parameters (for example, export.pdf(method=0distill.customPostScript="0" xslfop.print="0"))

Other SRD Settings

Other SRD settings that may result in parsing failure include:

  • Any of the X/Y/Width/Height settings has decimal value