خرید بک لینک

این مثال دم دستی هست:


public int A()
{
string stmt = "SELECT COUNT(*) FROM dbo.tablename";
int count = 0;

using(SqlCoection thisCoection = new SqlCoection("Data Source=DATASOURCE"))
{
using(SqlCommand cmdCount = new SqlCommand(stmt, thisCoection))
{
thisCoection.Open();
count = (int)cmdCount.ExecuteScalar();
}
}
retu count;
}

برچسب: نویسنده: محمد رضا جوادیان تاريخ: جمعه 2 تير 1396 ساعت: 18:29

صفحه بندی