Hi I\'m trying to connect an SQL server compact database to my program and I want a button that deletes all entries from the database, when I Press said button the program t
Have a look at this blog article: SQL SERVER – FIX : ERROR : (provider: Named Pipes Provider, error: 40 – Could not open a connection to SQL Server)
This goes step-by-step through what you might need to do:
In short:
- SQL Server should be up and running.
- Enable TCP/IP in SQL Server Configuration
- Open Port in Windows Firewall
- Enable Remote Connection
- Enable SQL Server Browser Service
- Create exception of sqlbrowser.exe in Firewall
- Recreate Alias
About the where and what to do in each step, you will find more in-depth information in the article.
You may also want to have a look at the Connection strings for SQL Server Compact. There you can find other variations of the connection string you could try to play with.