Torna al Thread
SqlConnection cn = new SqlConnection("Data Source=ip,porta;Network Library=DBMSSOCN;Initial Catalog=tuoDB;User ID=TuoUsername;Password=TuaPass;");
cn.Open();
string query = "SELECT * FROM Tabella WHERE ID = .... ";
SqlCommand cmd = new SqlCommand(query,cn);
SqlDataAdapter da = new SqlDataAdapter();
DataSet ds = new DataSet();
DataTable myData = new DataTable();
da.SelectCommand = cmd;
da.Fill(ds);
Dictionary<string, string> dic = new Dictionary<string, string>();
// ds.Tables[0].Columns[i].ColumnName ecco l'istruzione per ottenere i nomi degli header
//riempi il dictionary;
cn.Close();