Data source change error...

Using VS 2010, I have a simple project displaying the data from a table successfully. The database is loaded to the project as you can see at:

Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\WSCGSoftware.mdf

this is full App.config file:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <configSections>
    </configSections>
    <connectionStrings>
        <add name="TestFile.My.MySettings.WSCGSoftwareConnectionString"
            connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\WSCGSoftware.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True"
            providerName="System.Data.SqlClient" />
    </connectionStrings>
    <startup>
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client" />
    </startup>
</configuration>

Open in new window


in another computer, I want to change connection string so that this project will work with the same database in SQL SERVER 2008 R2 (Microsoft SQL Server Management Studio      10.50.1617.0).

I get error after I change to:

Data Source=(local);Initial Catalog=WSCGSoftware  <-- revised only this
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <configSections>
    </configSections>
    <connectionStrings>
        <add name="TestFile.My.MySettings.WSCGSoftwareConnectionString"
            connectionString="Data Source=(local);Initial Catalog=WSCGSoftware;Integrated Security=True;Connect Timeout=30;User Instance=True"
            providerName="System.Data.SqlClient" />
    </connectionStrings>
    <startup>
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client" />
    </startup>
</configuration>

Open in new window


Error: System.Data.SqlClient.SqlException, SQL Server error # 18493: The user instance login flag is not suported on this version of SQL Server. The connection will be closed.

Question: Is there anything else I can do in App.config file to make this work?

For your information, when I start a new project in VS2010 and connect to the same database in the same SQL Server 2008 R2, after droping a gridview on a form, I can see all the data. Meaning it works. And this process is how I got: Data Source=(local);Initial Catalog=WSCGSoftware

Is it possible some sp is missing?

Thank you
LVL 34
Mike EghtebasDatabase and Application DeveloperAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

unknown_routineCommented:
This happens if you have SQL 2008 R2 and SQL Express 2008 R2 on the same machine.

If so remove the Express instance.
0
Mike EghtebasDatabase and Application DeveloperAuthor Commented:
How can I uninstall without damaging 2008R2?

Where to start (step-by-step instructions will be helpful)?

Please see the image.
SQLFiles.png
0
Mike EghtebasDatabase and Application DeveloperAuthor Commented:
This works

connectionString="Data Source=(local);Initial Catalog=WSCGSoftware;Integrated Security=True;Connect Timeout=30;"

the following doesn't:
connectionString="Data Source=(local);Initial Catalog=WSCGSoftware;Integrated Security=True;Connect Timeout=30;User Instance=True"

User Instance=True had to be removed.

Mike
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Mike EghtebasDatabase and Application DeveloperAuthor Commented:
This solution works.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.