ODBC et CSharp

De Banane Atomic
Aller à la navigationAller à la recherche
40px
OdbcDataAdapter dbAdaptater = new OdbcDataAdapter("SELECT * FROM table WHERE validity_date < ?", odbcConnection);

dbAdaptater.SelectCommand.Parameters.Add("@date", OdbcType.DateTime).Value = maxLimitDate;

var dt = new DataTable();
odbcConnection.Open();
dbAdaptater.Fill(dt);
odbcConnection.Close();