ODBC et CSharp
De Banane Atomic
Aller à la navigationAller à la recherche
// use an ODBC DSN name using var odbcConnection = new OdbcConnection("DSN=MyConnection"); var odbcDataAdapter = new OdbcDataAdapter("SELECT * FROM table WHERE validity_date < ?", odbcConnection); odbcDataAdapter.SelectCommand.Parameters.Add("@date", OdbcType.DateTime).Value = maxLimitDate; var dataTable = new DataTable(); odbcConnection.Open(); odbcDataAdapter.Fill(dataTable); |