Monday 2 May 2011

Visual Studio 2010 Datasets with SQL Server 2000

It is possible to have a Visual Studio 2010 running aginst SQL Server 2000



I have a client running SQL Server 2000 and I have a UI developed in Visual Studio 2010. When trying to create reports for this I got the message "This server version is not supported.  You must have Microsoft SQL Server 2005 or later".

The client is not going to move to a new version of SQL Server just yet, so I had a problem.

The work around I came up with is to copy the database to SQL 2005 in my development environment, create the dataset and reports against this version at design time, then at run time, switch back to SQL2000. This worked fine.

Another problem I had to overcome was using temp tables when working with VS datasets.
The answer is to put this statement right at the beginning of the stored procedure:


 IF 1=0 BEGIN
     SET FMTONLY OFF
 END