0
I am sorry its only spelling mistake , My string is ;
SqlConnection conn = new SqlConnection(@"Data Source='" + tb6 + "';Initial Catalog='" + tb7 + "';user='" + tb8 + "';pwd='" + tb9 + "'");
SqlConnection conn2 = new SqlConnection(@"Data Source='" + tb1 + "';Initial Catalog='" + tb2 + "';user='" + tb3 + "';pwd='" + tb4 + "'");
and use windows application therefore dont need to webconfig , in this case how can u help me .
0
Hey Birol,
I am sure your code will be providing error to you, that's because you are declaring same connection name two times i.e.
SqlConnection conn = new SqlConnection(@"Data Source='" + tb6 + "';Initial Catalog='" + tb7 + "';user='" + tb8 + "';pwd='" + tb9 + "'");
SqlConnection conn = new SqlConnection(@"Data Source='" + tb1 + "';Initial Catalog='" + tb2 + "';user='" + tb3 + "';pwd='" + tb4 + "'");
Change these name, secondly if you are using web.config then also provide two different names for connection and use them separately.
Now coming to your second problem "How to integrate them, so for this problem firstly open a connection and do your work in it after doing your work close it. After this again open the connection and again do your work, now you will be having work in two different connections, so no problem just use the name of your variables outside the connections and play with them as you want
Thanks