Incorrect syntax near the keyword 'WITH'
来源:互联网 发布:淘宝禁止发布违背 编辑:程序博客网 时间:2024/06/11 19:33
I am using HRESULT Recordset15:: Open( const _variant_t & Source,...) function where
Source = "WITH RowOrder AS (SELECT [Chart Number] FROM [dbo].[Patient] ) SELECT * FROM RowOrder" in C++ module on SQL 2005 version 2005.90.3233.0. The msado15.dll version is 2.81.1132.0.
It returns DB_E_ERRORSINCOMMAND -"Incorrect syntax near the keyword 'WITH' ".
Error Numbers: 0x80040E14, 0x00000C14
Short Error:
Incorrect syntax near the keyword 'WITH'
Error:
Source: Microsoft OLE DB Provider for SQL Server
Description: Incorrect syntax near the keyword 'WITH'
Error Message: IDispathch error #3092
This query works fine on Microsoft SQL Server Management Studio Express version 9.00.3042.00.
Standard query like "SELECT * FROM [dbo].[Patient]" works without problem.
Any suggestions?
-------------------------------------------------------------
Try adding a semi colon ; before your WITH statement
-------------------------------------------------------------
Unbelievable, but it works after.
Thank you.
- Incorrect syntax near the keyword 'WITH'
- Incorrect syntax near 's'
- Sybase- Incorrect syntax near '2008'.
- SQL Incorrect syntax near 错误
- ...Incorrect syntax near '='. 低级问题
- c# - Entity Framework: Incorrect syntax near ‘OFFSET’
- 【sql server】解决 com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near '@P0'.
- 记一次Apach DBUtils的使用中出现的错误报错 Incorrect syntax near ','.
- the right syntax to use near USING BTREE错误解决办法
- [Bat] Error: The syntax of the command is incorrect.
- Something interesting with the keyword final
- Thread-safety with the Java final keyword
- Thread-safety with the Java final keyword
- Syntax error near "£"
- syntax error near unexpected token `
- syntax error near unexpected token `('
- sqlite(near "AUTO_INCREMENT": syntax error)
- “Error: near "sqlite3”: syntax error
- 商业智能方案部署之SQL Server 2008R2与SharePoint 2010环境的集成
- 关于数据质量“成长的烦恼”的五点建议
- 在ubuntu上安装jdk7u9
- 循环的应用---(1)判断输入是否合法,不合法要求重新输入(2)某项功能的循环执行
- Codec Engine 开发
- Incorrect syntax near the keyword 'WITH'
- 在线考试系统V3升级V5详解之一
- [宏]_IOC_NR, _IOC_TYPE, _IOC_SIZE, _IOC_DIR
- Can not Start the database server because of the host name changed
- cocos2d-x源码介绍-沈大海cocos2d-x教程之2
- VC6.0 配置 wxWidgets(跨平台界面控件库)
- C/C++检测内存泄漏的工具 vld Visual Leak Detector223 的使用方法和sample示例
- setjmp/longjmp
- 如何实现林和域的功能级别平稳安全升级?