1

I am trying to connect to MarkLogic ODBC server using pyodbc. The connection opens fine. However, when I run a query with cursor.execute, I get an error,

XDMP-UNEXPECTED: (err:XPST0003) Unexpected token syntax error, unexpected "", expecting ""

As per MarkLogic, this might happen if client expects transaction or adds "BEGIN..." at the start. In this case, even after turning pyodbc autocommit off, the error persists.

Note that the same query works with C# DataSet code.

The SQL query is simple SELECT * FROM TABLE_NAME.

Mads Hansen
  • 63,927
  • 12
  • 112
  • 147
Yogesh Sajanikar
  • 1,086
  • 7
  • 19

0 Answers0