Connecting to a local SQL Server database does not work in the setup exe application

0

After installing my setup exe application on "Client PC", all process are worked correctly, but when I try to save some data on the application's local SQL Server database, this exception is thrown and I do not know what the problem is, as this exception never happens on my own PC.

Is there any requirement must be installed on the client PC?

The exception is:

System.Data.SqlClient.SqlException (0x80131904)

Exception

The connection string:

<connectionStrings>
    <add name="Appstore.Properties.Settings.StoringAppConnectionString"
         connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=StoringApp;Integrated Security=True"
         providerName="System.Data.SqlClient" />
</connectionStrings>
c#
sql-server
installation
exe
asked on Stack Overflow Jul 16, 2018 by Nemo • edited Jul 16, 2018 by marc_s

2 Answers

0

You using a OBDC connection or something, make sure it's the same connection on the other PC compared to yours.

answered on Stack Overflow Jul 16, 2018 by DanB
0

Error 26 generally means that your SQL Server instance is not reachable. Typically it is attributed to the fact that SQL Server service not running. Can you verify that once. Also if its on a different computer, you many need to turn on TCP/IP protocol. Make sure to also put ports TCP-1433 and UDP-1434 in firewall exception. Let me know if this works out.

answered on Stack Overflow Jul 16, 2018 by Soham Dasgupta

User contributions licensed under CC BY-SA 3.0