ODBC et CSharp

De Banane Atomic
Aller à la navigationAller à la recherche
Csharp.svg
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();