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?
Share
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…