i have vb.net windows app and i can insert data to acomputer where sqlserver is installed in the same lan but could not connect from another network(different lan)to the computer.
Sounds right. You'll have to host the sqlserver where all can access. It's that simple.
I'm a newbie for sql server, but I did the installation yesterday. After several errors from a .net application another pc in the home group, a list box is populated. The listbox data is retrieved from a sql server database.
I had to configure windows firewall advanced settings to let sqlserver.exe pass through Click Here .
I dissabled sql server express services and enabled sql server services, sql server browser (not sure if this last one is necesary) and protocols (Click Here)
Lastly, I remember to enable both windows and sql server authentications (https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/change-server-authentication-mode).
So, after all that the connection string became for me: