Syntax Error Executing Query: (10713)

gollumullog

New Member
I am having some difficulty diagnosing an issue using Progress OpenEdge 10.1b (05.20.0083).

We are the developer of an application that tries to access a Progress Database over ODBC. The sql is automatically generated, so this issue is a little hard to test.

I am receiving a similar error using different SQL to try and access the same information:
First Query:
Source = Microsoft OLE DB Provider for ODBC Drivers, Description = [DataDirect][ODBC Progress OpenEdge Wire Protocol driver][OPENEDGE]Syntax error in SQL statement at or about "AND entity."ENTITY-ID" = stuEntity."ENTI" (10713)] while parsing query:

Second Query (which is the first query using joins on the tables)
Source = Microsoft OLE DB Provider for ODBC Drivers, Description = [DataDirect][ODBC Progress OpenEdge Wire Protocol driver][OPENEDGE]Syntax error in SQL statement at or about "AND stuEntity."STUDENT-STATUS" = 'A' AND" (10713)] while parsing query:

These queries are quite large, and are accessing 5 tables.

I have had this same query work for other users. So I'm wondering if there is a setting on the driver that needs to be set, or if this query is timing out, but returning a syntax error instead....

Any help greatly appreciated.
 

DevTeam

Member
Couldn't it be a quote issue ? I think you build your SQL code by concatening string samples, and you also surround table names with quotes (in order to deal with the use of "-" into it).

Don't you have to protect those quotes ?

For example, in Java we would have to do this :
Code:
sqlQuery += "AND entity.\"ENTITY-ID\" = stuEntity.\"ENTI\" ";

As Andrew said, more information could be useful !
 
Top