View Full Version : سوال: ارتباط بين sqlبا C#
  
fatemeh mahdavi
چهارشنبه 29 اردیبهشت 1389, 19:24 عصر
:اشتباه:سلام ميخوام بين sqlو #cازتباط برقرار كنم؟
hamid_massaelly
پنج شنبه 30 اردیبهشت 1389, 09:37 صبح
از کلا sqlconnection یک شیع ایجاد کن مثل کد زیر
        using(SqlConnection temp = new SqlConnection())
        {
            try
            {
                temp.Close();
                temp.ConnectionString =@"Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=Terminal;Data Source=MASSAELL-0DF6B8\SQLEXPRESS";;
                temp.Open();
            }
            catch (Exception)
            {
                tempb = false;
                temp.Close();
            }
        }
 
vBulletin® v4.2.5, Copyright ©2000-1404, Jelsoft Enterprises Ltd.