Bonjour,
J'ai codé quelque chose comme celà :
// Create a DataTable.
DataTable table = newDataTable("Product");
// Create a DataColumn and set various properties.
DataColumn column = newDataColumn();
column.DataType = System.Type.GetType("System.Decimal");
column.AllowDBNull = false;
column.Caption = "Price";
column.ColumnName = "Price";
column.DefaultValue = 25;
// Add the column to the table.
table.Columns.Add(column);
// Add 10 rows and set values.
DataRow row;
for (int i = 0; i < 10; i++)
{
row = table.NewRow();
row["Price"] = i + 1;
// Be sure to add the new row to the
// DataRowCollection.
table.Rows.Add(row);
}
Maintenant je souhaiterai sauvegarder ma table Product sur disque dur
"C:\MyProducts.mdb" comment faite ?
Merci
Tintin92
Partager