i have created a software with database?
at my office there are 10 people work with me?
so i created that software to internal purpose
sql located in my pc.
after i installed software to another pc, it will be able to access my pc sql database?
how can i do that?
string connetionString = null;
string name = "";
string pass = "";
connetionString = "Data Source=172.21.1.91;Initial Catalog=EnqInfo;Network Library=DBMSSOCN;Integrated Security=SSPI";
using (SqlConnection con = new SqlConnection(connetionString))
{
con.Open();
using (SqlCommand command = new SqlCommand("SELECT * FROM Login WHERE U_Name=@Usr", con))
{
command.Parameters.AddWithValue("@Usr", UName.Text);
SqlDataReader reader = command.ExecuteReader();
while (reader.Read())
{
name = reader.GetString(1);
pass = reader.GetString(2);
}
if (name == UName.Text && pass == PWord.Text)
{
ClassEnq.Uname = UName.Text;
MessageBox.Show("Password Accepted");
this.Close();
setEnableToolStripMenuItem(true);
setEnableToolStripMenuItem1(true);
setDisableToolStripMenuItem(false);
}
else
{
MessageBox.Show("Password Incorrect, Please Re-Enter Your Password");
setEnableToolStripMenuItem(false);
setEnableToolStripMenuItem1(false);
}
}
i have given my ip for data source?
i have configured firewall settings.
enabled tcp/ip using sql sever configure manager.
i have tried many ways
i'm using sql server 2008 r2
what can i do for this, please help me to solve this?