So, I have a more complex, but similar issue. The following code gives me the same error as described in this thread.
strSQL = "USE TEST " & _
"DECLARE @Pointer binary(16), @StringToAppend varchar(100) " & _
"SET @StringToAppend = '...TEST STRING...' " & _
"SELECT...