ascot diagnostics

A7340

Error: Field ‘{field}’ not found in the applicable tables ({tables}); the statement gets SQLCODE -29 when it runs

A column that none of the applicable tables has: the table is a class, and no property of it or of its ancestors is projected under that name – a property’s SqlFieldName or its own name, ID or the class’s SqlRowIdName, a serial property’s fields as Property_Field. IRIS compiles the statement and gives it SQLCODE -29 when it runs.

IRIS rejects the example.

Class Demo.SqlPerson Extends %Persistent
{

Property Name As %String;

Property Age As %Integer [ SqlFieldName = Years ];

}

IRIS compiles the example.

Class Demo.SqlFieldNotFound
{

ClassMethod Oldest() As %String
{
    &sql(SELECT Name INTO :name FROM Demo.SqlPerson WHERE Age > 90) //! A7340
    Quit name
}

}

All diagnostics