To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=58318
Issue #:|58318
Summary:|SQL being incorrectly processed for ODBC.
Component:|Database access
Version:|OOo 2.0
Platform:|PC
URL:|
OS/Version:|Windows XP
Status:|UNCONFIRMED
Status whiteboard:|
Keywords:|
Resolution:|
Issue type:|DEFECT
Priority:|P3
Subcomponent:|none
Assigned to:|dbaneedsconfirm
Reported by:|johngrubb
------- Additional comments from [EMAIL PROTECTED] Tue Nov 22 09:22:59 -0800
2005 -------
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.
---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]