My database is in shared folder. now i want to connect to shared database. how to write sqlconnection string.
here i am using that shared database ip address but no use..
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Posted Oct 18, 2011, 6:50 AM
Sam HobbsPosted Oct 15, 2011, 8:03 PM
Hemant KumarPosted Oct 15, 2011, 6:33 AM
Pravin GhadgePosted Oct 15, 2011, 12:29 AM
Change ur conn string as follows:
string sqlString = "Data Source=192.168.1.2;initial catalog=Uganda_SEMIS;Integrated Security=true;User Instance=True; ";
SqlConnection con = new SqlConnection(sqlString);
con.Open();
con.Close();
&
2)make TCP/IP enabled
3)Windows firewall off
Posted Oct 14, 2011, 5:43 AM
Pravin GhadgePosted Oct 14, 2011, 4:59 AM
Plz check firewall setting of shared PC.
If windows firewall is on then
turn it off
Posted Oct 14, 2011, 4:24 AM
Pravin GhadgePosted Oct 14, 2011, 3:43 AM
r u getting some error?
if yes plz share that error.
Posted Oct 14, 2011, 3:32 AM
string sqlString = "Data Source=192.168.1.2;AttachDbFilename="Uganda_SEMIS";Integrated Security=true;User Instance=True; ";SqlConnection con = new SqlConnection(sqlString);
con.Open();
con.Close();
Hemant KumarPosted Oct 14, 2011, 2:32 AM
Please share your code .
Posted Oct 14, 2011, 2:28 AM
Hemant KumarPosted Oct 14, 2011, 2:25 AM