We help IT Professionals succeed at work.

SQL 2008  (10) Not Supported vb.net Commands

I have a vb.net app designed to automaticlly deploy table/stored procedure scripts to a designated SQL Server 2000 database  that worked great with SQL 2000 but now gives the following error message when trying to run on SQL Server 2008:

This SQL Server version (10 0) is not supported

The code is:

Imports Microsoft.SqlServer.Management.Smo

Dim server As New Microsoft.SqlServer.Management.Common.ServerConnection(connection)

Me.CurrentTask.Text = reader(0).ToString

strFileContents = My.Computer.FileSystem.ReadAllText(reader(0).ToString)

It gives the error on the line above at: server.ExecuteNonQuery(strFileContents)

I've tried to do searches; but haven't found any solution that seems to work - please let me know if I've overlooked the solution here.

Thanks for any help.

Watch Question

You need to remove the references to 2000 SDK library and add the required namespaces again by importing the SDK assemblies for 2008. They are usually in the C:\Program Files\Microsoft SQL Server\100\SDK\Assemblies\ folder.

For further info see:


Thanks.  I'll try that and advise