[Solved] Windows Form EXE file Error: 40 Could not open a connection to SQL Server

Last Reply one month ago By nedash

Posted one month ago

hi

I created a windows application form and wrote below link's code on it:

Refresh DataGridView after record delete in Windows Application using C# and VB.Net

and then right-clicked on the project and clicked on PUBLISH then created set.exe file when I ran the set.exe file on my PC it was ok and install and then ran form, but I tried it on another PC and when I ran set.exe file it showed below error:

https://gofile.io/d/f3BsqB

why this happens I know it is because of the database but I want to create a windows application project that when I create .exe file I can run it on every PC

Best regards

Neda

You are viewing reply posted by: nedash one month ago.
Posted one month ago

I found the answer please refer below video

https://www.youtube.com/watch?v=xP0GRfBb58w

Best regards

Neda