Could you try removing the default (newid() ) from the guid column?
--
Alex Feinman
---
Visit
http://www.opennetcf.org
"Ady" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Hello
>
> I'm loading in memory couple tables into a DataSet and then I try to add a
> new row (in memory). This gives me an dataconstraintexception.
> Here is the code:
> //load dataset
> SqlCeDataAdapter da = new SqlCeDataAdapter(request, connexionBD);
> da.AcceptChangesDuringFill = false;
> da.FillSchema(dataSet, SchemaType.Source, tableName);
> da.Fill(dataSet, tableName);
> da.Dispose();
> -----------------------------
> //insert a new second row
> DataRow row = dataSet.Tables["Details"].NewRow();
> row["details_guid"] = guid;
> row["quantity"] = 0;
> ..
> dataSet.Tables["Details"].Rows.Add(row);
> -----------------------------
> {"Column 'details_guid' is constrained to be unique. Value
> '1f7b4edd-d5cd-43f9-b186-1907c67f82d8' is already present." }
> even if I'm looking into the table and I can see that it still has only
> one
> row (like before inserting the second row) and the guid is generated using
> Win32 API and is different every time !
>
> In SQL CE DB the column details_guid is default value: (newid()) and
> isRowGuid: No.
>
> Thank you
>
>