When running SQL queries against an InterSystems Caché connection, a query may fail if it ends with a trailing semicolon.
This issue applies specifically to InterSystems Caché connections and does not apply to InterSystems IRIS.
Error
A query that ends with a semicolon may return an error similar to:
SQLCODE: -25
For example:
SELECT * FROM Sample.Table;
The trailing semicolon at the end of the query can cause the Caché driver to reject the statement.
Resolution
Remove the trailing semicolon from the SQL query.
Use:
SELECT * FROM Sample.Table
Instead of:
SELECT * FROM Sample.Table;
Run the query again after removing the semicolon.
Why This Occurs
Older versions of VDM could appear to accept queries containing a trailing semicolon because whitespace at the end of the query could affect how the statement was sent to the database.
In VDM 2026, that trailing whitespace is removed before the query is submitted.
As a result, the InterSystems Caché driver receives the semicolon directly at the end of the statement and may return an SQLCODE -25 error.
InterSystems IRIS
This behavior is specific to the legacy InterSystems Caché connection.
Queries using an InterSystems IRIS connection are not affected by this trailing-semicolon issue.
If the Query Still Fails
If removing the trailing semicolon does not resolve the problem:
- Confirm the connection is using InterSystems Caché.
- Review the SQL query for other syntax errors.
- Test the query directly against the Caché database if possible.
- Review the VDM application logs for additional error details.
- Contact BridgeWorks Support if the issue continues.
Comments
0 comments
Please sign in to leave a comment.