views:

30

answers:

1

I am doing a small reporting project that needs to read a lot of data from an SQL Server 2000 database. I am using Linq-to-SQL; and when I run one of my queries, I get this Exception:

NotSupportedException: Cannot translate expression to SQL for this server version

This message indicates that my query will work on a newer server version. But can I be sure that it will run on a newer version, and how do I determine which version is needed ?

Perhaps I can upgrade to SQL Server 2008, but it has a cost in both time and money. Therefore, I would like to know whether it would help me in this situation.

+2  A: 

Any version later than 2000 should work for you. This probably has to do with the fact that SQL 2000 does not support VARCHAR(MAX) and VARBINARY(MAX) datatypes, though you never know -- it depends on what exactly you're trying to do, I guess.

The cold hard truth is that SQL 2000 is 9 years old now. It's time to upgrade. You're way late to the party. SQL 2000 isn't even supported by Microsoft's "mainstream" support structure. The new technologies have to assume some reasonable window of product stack underneath them, and for Linq to SQL, it pretty much starts with SQL 2005.

Dave Markle
Yes, SQL Server 2000 is old, and I hate being forced to keep supporting it. But we have legacy systems that cannot be upgraded due to (and I quote the DBA) "legacy reasons". :-(
driis
Then stop trying to do new things with the old, "legacy" systems.
John Saunders
John, you're probably right.
driis