At the moment i migrating an old project to XE8.
i use zeos 7.1.4-stable with protocol ado to connect to an SQL-Server.
when i execute a query with the following SQL:
"DECLARE @param varchar(20);
SET @param=:param
SELECT *
FROM (
SELECT 1 as abc
) as sub
WHERE sub.abc=@param
"
i got an EOleException with "syntax error or access violation".
"DECLARE @param varchar(20);
SELECT *
FROM (
SELECT 1 as abc
) as sub
WHERE sub.abc=:param"
works fine. In the old version the SQL on top also works.
Has anybody an idea:
- where to search for the error?
- an idea for an workaround?
it's important to specify the param first in a variable, because in the original code there is a lot of string replace and so on around the parameter. i just isolated the problem to the sql code above.
Best Regards,
Thomas
Syntax error and access violation with parameters
The official tester's forum for ZeosLib 7.1. Ask for help, post proposals or solutions.
Return to “ZeosLib 7.1 stable Forum”
Jump to
- Links
- ↳ Bugtracker
- ↳ Downloads
- ↳ Subversion
- ↳ GitHub
- ZEOS Library - General
- ↳ Announcements
- ↳ Downloads
- ↳ Documentations
- ↳ Tutorials
- ↳ ZDBC (ZEOS Database Connectivity)
- ↳ User Contributions
- ↳ Feature Requests
- ↳ User Patches
- ZEOS DBO v8.x
- ↳ ZeosLib 7.3/8.0 Forum
- ZEOS DBO v7.x
- ↳ ZeosLib 7.2 Forum
- ↳ ZeosLib 7.1 stable Forum
- ↳ ZeosLib 7.0 Stable Forum
- ↳ ZeosLib 7.0 Beta Forum
- SQL Servers and Databases
- ↳ ADO
- ↳ DB2
- ↳ Firebird
- ↳ Interbase
- ↳ MS SQL Server
- ↳ MySQL
- ↳ Oracle
- ↳ OleDB (Microsoft Windows)
- ↳ ODBC
- ↳ PostgreSQL
- ↳ SQLite
- ↳ Sybase ASE
- Compiler related
- ↳ CBuilder / C++
- ↳ Lazarus / Freepascal
- ZEOS DBO V 6.x
- ↳ 6.6 - stable
- ↳ 6.5.1 (alpha) - 6.6.x (beta)
- ↳ 6.1.5
- ↳ Other 6.x Versions
- ↳ Bug Reports
- ZEOS DBO V 5.x
- ↳ 5.x Versions
- Software projects using ZeosLib
- ↳ SQLite Administrator
- Other and Non-Technical
- ↳ Off Topic