Here's the update comand that visula studio generated for me:
this.daDocumenti.UpdateCommand.CommandText = @"UPDATE Documenti SET
clienteID = ?, dataDocumento = ?, documentoPathName = ?, evaso = ?,
[note] = ?, numeroDocumento = ?, scontoPercentuale = ?,
tipoDocumentoID = ?, totaleDocumento = ?, totaleIVA = ?, totaleNetto =
?, totaleRighe = ? WHERE (documentoID = ?) AND (clienteID = ?) AND
(dataDocumento = ? OR ? IS NULL AND dataDocumento IS NULL) AND
(documentoPathName = ? OR ? IS NULL AND documentoPathName IS NULL) AND
(evaso = ?) AND (numeroDocumento = ? OR ? IS NULL AND numeroDocumento
IS NULL) AND (scontoPercentuale = ? OR ? IS NULL AND scontoPercentuale
IS NULL) AND (tipoDocumentoID = ?) AND (totaleDocumento = ? OR ? IS
NULL AND totaleDocumento IS NULL) AND (totaleIVA = ? OR ? IS NULL AND
totaleIVA IS NULL) AND (totaleNetto = ? OR ? IS NULL AND totaleNetto
IS NULL) AND (totaleRighe = ? OR ? IS NULL AND totaleRighe IS NULL)";
this.daDocumenti.UpdateCommand.Parameters.Add(new
System.Data.OleDb.OleDbParameter("clienteID",
System.Data.OleDb.OleDbType.Integer, 0, "clienteID"));
this.daDocumenti.UpdateCommand.Parameters.Add(new
System.Data.OleDb.OleDbParameter("dataDocumento",
System.Data.OleDb.OleDbType.DBDate, 0, "dataDocumento"));
this.daDocumenti.UpdateCommand.Parameters.Add(new
System.Data.OleDb.OleDbParameter("documentoPathName",
System.Data.OleDb.OleDbType.VarWChar, 200, "documentoPathName"));
this.daDocumenti.UpdateCommand.Parameters.Add(new
System.Data.OleDb.OleDbParameter("evaso",
System.Data.OleDb.OleDbType.Boolean, 2, "evaso"));
this.daDocumenti.UpdateCommand.Parameters.Add(new
System.Data.OleDb.OleDbParameter("note",
System.Data.OleDb.OleDbType.VarWChar, 0, "note"));
this.daDocumenti.UpdateCommand.Parameters.Add(new
System.Data.OleDb.OleDbParameter("numeroDocumento",
System.Data.OleDb.OleDbType.Integer, 0, "numeroDocumento"));
this.daDocumenti.UpdateCommand.Parameters.Add(new
System.Data.OleDb.OleDbParameter("scontoPercentuale",
System.Data.OleDb.OleDbType.Double, 0, "scontoPercentuale"));
this.daDocumenti.UpdateCommand.Parameters.Add(new
System.Data.OleDb.OleDbParameter("tipoDocumentoID",
System.Data.OleDb.OleDbType.Integer, 0, "tipoDocumentoID"));
this.daDocumenti.UpdateCommand.Parameters.Add(new
System.Data.OleDb.OleDbParameter("totaleDocumento",
System.Data.OleDb.OleDbType.Double, 0, "totaleDocumento"));
this.daDocumenti.UpdateCommand.Parameters.Add(new
System.Data.OleDb.OleDbParameter("totaleIVA",
System.Data.OleDb.OleDbType.Double, 0, "totaleIVA"));
this.daDocumenti.UpdateCommand.Parameters.Add(new
System.Data.OleDb.OleDbParameter("totaleNetto",
System.Data.OleDb.OleDbType.Double, 0, "totaleNetto"));
this.daDocumenti.UpdateCommand.Parameters.Add(new
System.Data.OleDb.OleDbParameter("totaleRighe",
System.Data.OleDb.OleDbType.Double, 0, "totaleRighe"));
this.daDocumenti.UpdateCommand.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_documentoID",
System.Data.OleDb.OleDbType.Integer, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "documentoID",
System.Data.DataRowVersion.Original, null));
this.daDocumenti.UpdateCommand.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_clienteID",
System.Data.OleDb.OleDbType.Integer, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "clienteID", System.Data.DataRowVersion.Original,
null));
this.daDocumenti.UpdateCommand.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_dataDocumento",
System.Data.OleDb.OleDbType.DBDate, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "dataDocumento",
System.Data.DataRowVersion.Original, null));
this.daDocumenti.UpdateCommand.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_dataDocumento1",
System.Data.OleDb.OleDbType.DBDate, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "dataDocumento",
System.Data.DataRowVersion.Original, null));
this.daDocumenti.UpdateCommand.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_documentoPathName",
System.Data.OleDb.OleDbType.VarWChar, 200,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "documentoPathName",
System.Data.DataRowVersion.Original, null));
this.daDocumenti.UpdateCommand.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_documentoPathName1",
System.Data.OleDb.OleDbType.VarWChar, 200,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "documentoPathName",
System.Data.DataRowVersion.Original, null));
this.daDocumenti.UpdateCommand.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_evaso",
System.Data.OleDb.OleDbType.Boolean, 2,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "evaso", System.Data.DataRowVersion.Original,
null));
this.daDocumenti.UpdateCommand.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_numeroDocumento",
System.Data.OleDb.OleDbType.Integer, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "numeroDocumento",
System.Data.DataRowVersion.Original, null));
this.daDocumenti.UpdateCommand.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_numeroDocumento1",
System.Data.OleDb.OleDbType.Integer, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "numeroDocumento",
System.Data.DataRowVersion.Original, null));
this.daDocumenti.UpdateCommand.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_scontoPercentuale",
System.Data.OleDb.OleDbType.Double, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "scontoPercentuale",
System.Data.DataRowVersion.Original, null));
this.daDocumenti.UpdateCommand.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_scontoPercentuale1",
System.Data.OleDb.OleDbType.Double, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "scontoPercentuale",
System.Data.DataRowVersion.Original, null));
this.daDocumenti.UpdateCommand.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_tipoDocumentoID",
System.Data.OleDb.OleDbType.Integer, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "tipoDocumentoID",
System.Data.DataRowVersion.Original, null));
this.daDocumenti.UpdateCommand.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_totaleDocumento",
System.Data.OleDb.OleDbType.Double, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "totaleDocumento",
System.Data.DataRowVersion.Original, null));
this.daDocumenti.UpdateCommand.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_totaleDocumento1",
System.Data.OleDb.OleDbType.Double, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "totaleDocumento",
System.Data.DataRowVersion.Original, null));
this.daDocumenti.UpdateCommand.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_totaleIVA",
System.Data.OleDb.OleDbType.Double, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "totaleIVA", System.Data.DataRowVersion.Original,
null));
this.daDocumenti.UpdateCommand.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_totaleIVA1",
System.Data.OleDb.OleDbType.Double, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "totaleIVA", System.Data.DataRowVersion.Original,
null));
this.daDocumenti.UpdateCommand.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_totaleNetto",
System.Data.OleDb.OleDbType.Double, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "totaleNetto",
System.Data.DataRowVersion.Original, null));
this.daDocumenti.UpdateCommand.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_totaleNetto1",
System.Data.OleDb.OleDbType.Double, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "totaleNetto",
System.Data.DataRowVersion.Original, null));
this.daDocumenti.UpdateCommand.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_totaleRighe",
System.Data.OleDb.OleDbType.Double, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "totaleRighe",
System.Data.DataRowVersion.Original, null));
this.daDocumenti.UpdateCommand.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_totaleRighe1",
System.Data.OleDb.OleDbType.Double, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "totaleRighe",
System.Data.DataRowVersion.Original, null));
Some words are in italian but you should unerstand it anyway...
Let me know if you have any suggestion please!