1private string RitornaComune(string CodCat, string NomeDB)
2 {
3 string conn = StringaConnessione.GetStringaConnessione(NomeDB);
4 SqlConnection connection = new SqlConnection(conn);
5 SqlDataAdapter adapter = new SqlDataAdapter();
6 String StrSql = "SELECT COMUNE FROM COMUNI WHERE " +
7 "CODCAT='" + CodCat + "'";
8 adapter.SelectCommand = new SqlCommand(StrSql, connection);
9 SqlCommandBuilder builder = new SqlCommandBuilder(adapter);
10 connection.Open();
11 DataSet dataSet = new DataSet();
12 adapter.Fill(dataSet, "COMUNI");
13 string DesComune = dataSet.Tables["COMUNI"].Rows[0]["COMUNE"].ToString();
14 connection.Close();
15 return DesComune;
16
17 }