SQL语句“WITH”不适用于 Visual basic 6
我刚刚创建了一个查询,其中涉及对由WITH 语句创建的表进行选择;我想在 Visual Basic 6 应用程序(通过 ADODB 对象连接到数据库)上运行,但当我使用 ADODB.recordset 的 open 方法时,收到错误消息“关键字“WITH”附近的语法不正确”对象;就像 Visual Basic 6 不理解这个语句,我该如何解决这个问题?
I've just created a query which involves a selection on a table created by the WITH statement; I'd like to run in on a Visual Basic 6 application (connected to the database by an ADODB object) but I got an error message "incorrect syntax near the keyword "WITH", when I use the open method of a ADODB.recordset Object; it's like Visual Basic 6 doesn't understand this statement. How could I fix this? Is there an alternative way to perform the sql's WITH statement on Visual Basic 6?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
一分钱一分货(在没有更多信息且很可能是不完整的错误消息的情况下),WITH 由于 SET 语句或 DECLARE 等语句而没有前面的
;
。关键字 ' 附近的语法不正确with'...前一个语句必须以分号终止
或者OP仍在使用SQL Server 2000...
A pound for a penny (in the absence of any more information and most likely incompleete error message) that the WITH does not have a preceeding
;
because of a SET statement or DECLARE or some such.Incorrect syntax near the keyword 'with'...previous statement must be terminated with a semicolon
Or OP is using SQL Server 2000 still...