Allora nel mio web config ho la stringa di connessioene al db:
codice:<appSettings> <add key="ConnectionString" value="Provider=sql.mioprov.it;Data Source=pippo;User Id=pippo;Password=pluto;" /> </appSettings>
nel mio page load ho questo:
Il mio problema è che pur avendo using System.Data.OleDb; e using System.Data; quando compilo ho due errori:codice:string ob = System.Configuration.ConfigurationSettings.AppSettings["ConnectionString"]; String sql = "Select * from CATEGORIE ORDER BY CATEGORIA ASC"; OdbcDataAdapter Com = new OdbcDataAdapter(sql, ob); DataSet ds = new DataSet(); Com.Fill(ds); RepCat.DataSource = ds.Tables[0]; RepCat.DataBind();
The type or namespace name 'OdbcDataAdapter' could not be found (are you missing a using directive or an assembly reference?)

Rispondi quotando