Icon View Incident Report

Serious Serious
Reported By: Jon Bondy
Reported On: 7/10/1999
For: Version 1.15 Build 1
# 459 Problems When Using Field Names As Constants in SQL Queries

It is my impression that the SQL statement
Where ('fName' = 'blue')
is ambiguous (in that 'fName' and/or 'blue' could be either a field or a literal). Thus, if a user accidentally has a field value of 'blue' for the field 'fName', and if there is another field named 'blue', then the SQL might not behave the way the user would wish: the SQL might compare the values of the
two fields, and not a field vs a literal. The issue seems to be that statements like 'field = literal' should behave correctly independent of the names of the other fields. SQL which worked 'correctly' on Monday, might start misbehaving simply because the developer added a field named 'blue'.


Comments Comments and Workarounds
We changed the way brackets are interpreted so that if the developer uses brackets for field names in SQL queries there will not be any amiguity. We also added some intelligence to the way constants are intrepreted so that field names with quotes are compared properly to string constants also.


Resolution Resolution
Fixed Problem on 7/16/1999 in version 1.16 build 1
Image