root/branches/TruckExpo/TruckExpoCDN/DBUtils.cs @ 769

Wersja 415, 0.6 KB (wprowadzona przez marek, 17 years temu)

re #104

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