Apache OpenOffice (AOO) Bugzilla – Issue 58318
SQL being incorrectly processed for ODBC.
Last modified: 2006-06-12 15:24:27 UTC
This is Definitely related to 50442, which was incorrectly resolved as invalid. The case for Progress 9 target DB, but will be affecting any DB which does not have an identifier quoting character. The Progress SQL89/4GL implementation does not have a quoting character. The SQL92 does, but SQL89 is extremely common. If a table has a "-" (or other special character) in the name of a field, the SQL will be parsed with the hyphen interpreted as minus sign. Field definition, as per SQLColumns api call from odbctest: <Null>, "pro1", "Customer", "Cust-Num", 4, "integer", 5, 4, 0, 10, 1, "", "0", 4, 0, <Null>, 10, "YES", ">>>>9" The field name is Cust-Num. Progress does not have a quoting charater, so the name must be reproduced as that string. In accessing the table in the Base front, the table generates an error, "Unknown field or variable name Cust". The ODBC Trace reveals this is the guilty call. New Database3 15ac-1140 ENTER SQLPrepare HSTMT 06501CB8 UCHAR * 0x068C3140 [ 66] "SELECT * FROM SPORTS.Customer WHERE SPORTS.Customer.Cust - Num = ?" SDWORD 66 New Database3 15ac-1140 EXIT SQLPrepare with return code -1 (SQL_ERROR) HSTMT 06501CB8 UCHAR * 0x068C3140 [ 66] "SELECT * FROM SPORTS.Customer WHERE SPORTS.Customer.Cust - Num = ?" SDWORD 66 DIAG [HY000] [OpenLink][ODBC][Progress Server]** Unknown Field or Variable name - Cust. (201) (201) Note the SQL "SELECT * FROM SPORTS.Customer WHERE SPORTS.Customer.Cust - Num = ?". I am unsure why a parameter is being defined here, but it may be due to a different bug in the parser. The User operation is supposed to retrieve the data. There is no limits or the query for other tables. If there is no quoting character (SQLGetInfo for SQL_IDENTIFIER_QUOTE_CHAR), the sql statement must not have the added spaces. I will be posting the full trace.
Created attachment 31716 [details] Zip of the trace
does it still occure in current version?
no respond -> seems to be fixed in between
=> close do not hestitate to reopen this issue if bug is still reproducable in current version thx