hello Ilya,
there is no hidden autoincrement key in my dataset. saving the dataset
as a diffgram works excellent.
i found something else:
when i copy all modified rows to a new dataset, their rowstate becomes
"inserted" (checked the local diffgram xml copy)
uploading them causes a primary key constraint violation (makes sense,
they are "inserted" so uploading them would create a copy with the same
primary key)
calling a acceptchanges on the dataset that contains the changed rows,
removes the "inserted" state. an upload works, however the update
method returns 0 updated rows. no updates on the server side.
manually setting them to "modified" seems not possible (cannot change
the rowstate manually)
so i guess i have to change something on the server...? the setup there
relatively simple, just a database and i used the vs.net2003 wizard to
create a data adapter.
the only thing that makes me wonder is the following (autogenerated)
code:
this.sqlUpdateCommand1.CommandText = @"UPDATE manifest SET id = @id,
cash = @cash, signature = @signature, WHERE (id = @Original_id)";
this.sqlUpdateCommand1.Connection = this.sqlConnection1;
this.sqlUpdateCommand1.Parameters.Add(new
System.Data.SqlClient.SqlParameter("@id", System.Data.SqlDbType.BigInt,
8, "id"));
this.sqlUpdateCommand1.Parameters.Add(new
System.Data.SqlClient.SqlParameter("@cash", System.Data.SqlDbType.Bit,
1, "cash"));
this.sqlUpdateCommand1.Parameters.Add(new
System.Data.SqlClient.SqlParameter("@signature",
System.Data.SqlDbType.VarBinary, 2147483647, "signature"));
this.sqlUpdateCommand1.Parameters.Add(new
System.Data.SqlClient.SqlParameter("@Original_id",
System.Data.SqlDbType.BigInt, 8, System.Data.ParameterDirection.Input,
false, ((System.Byte)(0)), ((System.Byte)(0)), "id",
System.Data.DataRowVersion.Original, null));
whatis the original id?
florian