Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I have a SQL Server 2005 box with a classic ASP front end (IIS6) calling a stored procedure that uses dynamic SQL. It works except for a single day of data that somehow throws this error even though it runs fine in SSMS.

Since it works for other date ranges and works within SSMS (with this date range), I'm guessing there must be something in the dataset that's triggering the error. However, calls to it using the date range plus filters that result in no data returned still triggers this error, so I don't think it's related to what's being passed back to the IIS app.

Any suggestions on how I can track this down would be appreciated.

Thanks

share|improve this question

closed as off-topic by Max Vernon, Phil, RolandoMySQLDBA, Paul White, marc_s May 22 at 18:52

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Too localized - this could be because your code has a typo, basic error, or is not relevant to most of our audience. Consider revising your question so that it appeals to a broader audience. As it stands, the question is unlikely to help other users (regarding typo questions, see this meta question for background)." – Max Vernon, Phil, RolandoMySQLDBA, marc_s
If this question can be reworded to fit the rules in the help center, please edit the question.

    
You need to add some details - tables, sample data, queries, etc. Without details, we have no way of knowing what the issue is. –  Max Vernon May 20 at 23:31
    
The query is fairly involved. I was just trying to understand how this error comes about. Also, today it started working again. From what I read it could be a networking error, except that SQL & the app are on the same machine and we've seen no sign of networking problems beyond this. –  William Jens May 21 at 14:07

1 Answer 1

The error message means client TDS* processing received a token it didn't expect.

This might be a bug, but if so, it is most likely an old one that has long been fixed. You should ensure that the client connectivity components (e.g. MDAC, SQL Server client) are patched up to date (as far as possible, given the old technology).

You should also check that your SQL Server 2005 is running at least Service Pack 4 (though 2005 is out of mainstream support now too).

*tabular data steam; SQL Server's communication protocol

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.