root/trunk/TruckExpoCDN/DBUtils.cs

Wersja 479, 507 bytes (wprowadzona przez marek, 17 years temu)

re #134

Line 
1using System.Data.SqlClient;
2
3namespace ExportFaktur
4{
5    class DBUtils
6    {
7        public static object ExecuteScalarQuery(string query)
8        {
9            SqlConnection conn = new SqlConnection(ConnString.CDNConnection);
10
11            SqlCommand command = new SqlCommand(query);
12            command.Connection = conn;
13
14            conn.Open();
15            object result = command.ExecuteScalar();
16            conn.Close();
17
18            return result;
19        }
20       
21    }
22}
Notatka: Zobacz TracBrowser aby uzyskać więcej informacji.