1. share your database on LAN/WAN
2. set new connection string in exe/text file [where sql connection string is written]
step 1: follow steps given in this link
[For access sql database remotely(from different pcs)]
http://support.microsoft.com/kb/914277[
^]
step 2: after step 1 complete then change connection string's parameters,
datasource = server-name OR IP-Address [which is in sharing now after step 1] ;
Initial catalog = your database name ;
UserId = sql server - user login Id ;
Password = sql server - user login password;
Happy Coding!
:)