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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Hemant KumarRank #1,202 · 1.5K reputationPosted Oct 13, 2011, 10:25 PM EDT
Posted Oct 13, 2011, 10:28 PM EDT
Hemant KumarRank #1,202 · 1.5K reputationPosted Oct 13, 2011, 10:32 PM EDT
Please share your code .
Posted Oct 13, 2011, 11:32 PM EDT
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();
Pravin GhadgeRank #1,340 · 1.3K reputationPosted Oct 13, 2011, 11:43 PM EDT
r u getting some error?
if yes plz share that error.
Posted Oct 14, 2011, 12:24 AM EDT
Pravin GhadgeRank #1,340 · 1.3K reputationPosted Oct 14, 2011, 12:59 AM EDT
Plz check firewall setting of shared PC.
If windows firewall is on then
turn it off
Posted Oct 14, 2011, 1:43 AM EDT
Pravin GhadgeRank #1,340 · 1.3K reputationPosted Oct 14, 2011, 8:29 PM EDT
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
Hemant KumarRank #1,202 · 1.5K reputationPosted Oct 15, 2011, 2:33 AM EDT
Sam HobbsRank #107 · 20.5K reputationPosted Oct 15, 2011, 4:03 PM EDT
Posted Oct 18, 2011, 2:50 AM EDT