Visual Studio 2010 and SQL Server

Posted on 2011-05-11
Last Modified: 2012-05-11
I have upgraded to a new laptop and version of Visual Studio 2010. When I open studio and create a new project and attempt to connect to a test database on my sql 2003 server I receive a message that says "This server version is not supported" You must use sql 2005 or later. I have tried to google this error but the solutions provided seem to be for VS 2008 and not 2010. Does anyone know if there is a work around for this or am I missing someting? I can connect successfully via odbc and through enterprise manager if that means anything.
Question by:tmaususer

    Author Comment

    My apologies on the type 'o'. I am running sql server 2000 sp3 (not 2003 as first indicated).
    LVL 15

    Accepted Solution


    Mainstream support for SQL Server 2000 ended on 04/08/2008. Visual Studio 2010 only supports SQL Server 2005 and SQL Server 2008/2008 R2. In order to continue working with SQL Server 2000, you may use any of the earlier releases of Visual Studio.
    The ODBC connection is still enabled as ODBC is version independent. You will find many features disabled for ODBC connections.

    bassically NO you cant but (theres always a BUT) i saw this floating around.

    Use an ODBC Connection with the connection string
    Driver ={SQL Server}; Server =myServerAddress; Database =myDataBase; Uid =myUsername; Pwd =myPassword;


    Author Comment

    Ok so I am a novice at programmng at best. I have tried this code but get an error. The error I get is on this line: Dim Global_strProdCN As String = Global_settings.ConnectionString
    NullReferenceExceptionHandeled. I have not idea how to correct this given my "newbie" skills. The complete code is below.

    Imports System.Data.SqlClient
    Imports System.Configuration
    Imports System
    Imports System.IO
    Imports System.Net.Mime.MediaTypeNames

    Public Class Form1

        Dim Global_settings As ConnectionStringSettings
        Public Global_strProdCN As String
        Public Global_sqlProdCN As New SqlConnection
        Public Global_ERPsettings As ConnectionStringSettings
        Public Global_strERPCN As String
        Public Global_sqlERPCN As New SqlConnection
        Public Global_dr As SqlDataReader
        Public Global_sqlcmd As New SqlCommand
        Public Global_strsql As String
        Public Global_strProdCN2 As String
        Public Global_sqlProdCN2 As New SqlConnection

        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

            Global_settings = System.Configuration.ConfigurationManager.ConnectionStrings("Data Source=SERVER04N;Initial Catalog=yamahalabeldb;Integrated Security=True")
            Dim Global_strProdCN As String = Global_settings.ConnectionString
            Dim irowcnt As Integer = -1

            Global_strsql += " SELECT Part_no, Deliverylocation, po_no, supplier_id, labelcode, qty, duedate, stocklocation, sirlocation "
            Global_strsql += " FROM yam_con_label "
            Global_strsql += " Order by part_no "
            Global_sqlProdCN = New SqlConnection(Global_strProdCN)
            Global_sqlcmd = New SqlCommand(Global_strsql, Global_sqlProdCN)
            Global_dr = Global_sqlcmd.ExecuteReader()
            If Global_dr.HasRows Then
                While Global_dr.Read
                    irowcnt += 1
                    Dim srow() As String = {Global_dr.Item("Part_no"), Global_dr.Item("Deliverylocation"), Global_dr.Item("po_no"), _
                                            Global_dr.Item("supplier_id"), Global_dr.Item("labelcode"), Global_dr.Item("qty"), _
                                            Global_dr.Item("duedate"), Global_dr.Item("stocklocation"), Global_dr.Item("sirlocation")}
                End While
            End If

        End Sub

        Private Sub dgYamahadata_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgYamahadata.CellContentClick

        End Sub
    End Class

    Author Closing Comment

    I will repost my code under another zone.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Article by: Leon
    Software Metering within our group of companies has always been an afterthought until auditing of software and licensing became a pain point. Orchestrator and SCCM metering gave us the answer and it was an exciting process.
    This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
    Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
    The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …

    758 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now