Prerequisites: On server
1. Make sure you set the database for assess in dual mode,windows and sqlserver and add a userlogin say user name Logme, password 123abc.
It is important to check the sql server properties, and add this new login and make sure that permissions are set for select, update, etc, or you will get a login failure
2. Check your surface configuration manager
and nake sure remore server access is enabled,in addition to TCP and names pipes
reboot server
There are several ways to access the data over a lan, the following example uses Visual C#
String ConnectionString= "Data Source = server name on LAN; Initial Catalog= database name on server; User Id= logme; Password= 123abc; Trusted_Connection=False";
SqlConnection cn=New Sql Connection(connectionString);
cn.Open();
String sqlwhatever = "Select * from yourtable";
Sqlcommand command=new Sqlcommand(sqlwhatever,cn);
String sql = "Insert yourtable (ID,Lname,Fname) Values('";
sql=sql+"123456 ',";
sql=sql+"'Doe',";
sql=sql+"'John')";
command.CommandText=sql;
command.CommandTimeout= 20;
command.Connection= cn;
command.ExecuteNonQuery();
cn.Close();
Hope that helps
Ray