0
votes

I am trying to deploy my Visual Studio 2012 express LocalDB project to a remote host (another server in the sandbox) which is runnning SQL SERVER 2012 express. I changed the connection string in the web.config to match the instance name but it still doesnt work. Each time it fires off a dataset it fails with an error stating it cant find the instance.

Will I really have to go through the Dataset.Desinger.vb file and change the server\instance name for every project I do using LocalDB?

How exactly is this suppose to make things easier? :)

Dataset.Designer.vb autogenerated connection code:

Private Sub InitConnection()
        Me._connection = New Global.System.Data.SqlClient.SqlConnection()
        Me._connection.ConnectionString = "Data Source=(LocalDB)\v11.0;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated" & _
            " Security=True;User Instance=False"
    End Sub
1
please add your code into your question so that it can be more clear for us .Hiren Dhaduk
the code in dataset.designer.vb is auto-generated when a dataset is created through the database designer. Added to question as requested.Scott

1 Answers

0
votes

You should be sure that you make SQL Servers TCP/IP configuration right. I had the same problem before and I solved it by changing SQL Server Protocol UDP to 1434. Open Windows Firewall with advanced security. Find in left side Inbound Rules tab and click. Then find SQL Server and right click. Click properties. In Protocols and Ports tab change protocol type to UDP and as port number give 1434. I hope it helps.