Problem related to "Unknown token received from SQL Server " ?

BarryTang used Ask the Experts™
My platform is SQL server 7.0

I execute a very long SQL statement and receive the
error :

[Microsoft][ODBC SQL Server Driver]
Unknown token received from SQL Server

When I made my SQL staement a little short
( by deleting some subquery from it ) then
it run without error

Is it a resource problem in SQL server
Can I solve this problem ??
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Couple of general suggestions --
* Apply SP3 to your SQL7 installation
* Try using "SET ANSI_WARNINGS ON" in your SQL Statement

If you post the query that does not work and the one that does, maybe we can provide some specific suggestions. HTH.
Guy Hengel [angelIII / a3]Billing Engineer
Most Valuable Expert 2014
Top Expert 2009

i guess that you execute the statement using VB or C++ or whatever platform...
Try to insert some CRLF in your SQL statement, this should solve the problem:

instead of
SELECT <...........> FROM <..............> WHERE <..........>
do this:
SELECT <...........>
FROM <..............>
WHERE <..........>

You have 17 opened questions as of this date.  
I will be posting in each of these questions.  
Please take care of your opened questions older than 30 days by clicking on your logon name link and looking for UnlockedQ or using the links I am providing below.  
Please finalize these within 72 hours or I will ask administration to look into your account at that point.  If you have questions, please ask and I will provide assistance.

Thank you.
Administrative Action - PAQ'd and points NOT refunded.

Community Support Moderator @Experts Exchange

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial