In un windows Form ho un controllo DataGridView collegato a un DataSet che a sua volta è connesso a un database di Access. Per aggiornare il database Access con i dati che ho immesso nella datagrid ho scirtto questo codice:
Il compilatore mi restituisce un errore a Adatt.Update(dataSet, "Vendite"); e il messaggio di errore è questo: "Nessun valore specificato per alcuni parametri necessari."codice:private void bindingNavigatorSaveItem_Click(object sender, EventArgs e) { bindingSource.EndEdit(); string SQL = "INSERT INTO [Vendite] VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)"; string sConn = "Provider=Microsoft.Jet.OLEDB.4.0; " + "Data source=C:\\Users\\Matteo\\Desktop\\Stramaledetta Cartuccia.mdb"; Conn.ConnectionString = sConn; Conn.Open(); Cmd.CommandText = SQL; Cmd.CommandType = CommandType.Text; Cmd.Connection = Conn; Adatt.InsertCommand = Cmd; Adatt.Update(dataSet, "Vendite"); Conn.Close(); }
Che parametri mancherebbero???

Rispondi quotando