Make sure the sqlexpress instance is allowing connections over the internet
https://www.mcbsys.com/blog/2012/12/connect-to-sql-server-2012-express-over-the-network/
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi,
How do I connect my UWP app (running on a laptop, connected to the same network) to a different PC running SQL Server 2019 Express?
My app on the laptop needs to get data from a database hosted on SQL Server 2019 Express on my PC.
When I try to connect to the PC via the app on the laptop (I have a window to test the connection), I get an error.
Here's the connection string:
`
string connString = $"Data Source={serverName}\{instanceName}; Initial Catalog={databaseName}; Integrated Security=SSPI";
`
serverName
, instanceName
and databaseName
are variables that the user types in to the TextBoxes on the test connection window.
I have allowed remote connection to my database using SQL Server Configuration Manager: TCP/IP is set to Enabled
Any help is appreciated.
P.S.: The database is set up using Windows Authentication (if that info is relevant), but Mixed mode can also be used if it means that the app can work with the db on the server PC.
Make sure the sqlexpress instance is allowing connections over the internet
https://www.mcbsys.com/blog/2012/12/connect-to-sql-server-2012-express-over-the-network/
Please check if you are using the FQDN for ServerName in the connection string.
To get the FQDN, press and hold the Windows key, then press the Pause/Break key
Use the Full Computer Name