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

nedash
 
on Apr 06, 2021 05:13 AM
1494 Views

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

Download FREE API for Word, Excel and PDF in ASP.Net: Download
nedash
 
on Apr 08, 2021 01:10 AM

I found the answer please refer below video.

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

Best regards

Neda