Friday, March 30, 2012

Id getting generated differently

Hi,

I created a PDA application with a database, which has a table with a uniqueidentifier field and primarykey.

While doing the bulk insert from dataset into sql mobile database, It is inserting the record but it is not inserting the id which was entered into the sql server 2005 database, instead the id by creating a new id and the code is as below.

conAdap = new SqlCeDataAdapter(strQuery, conSqlceConnection);

SqlCeCommandBuilder cmdBuilder = new SqlCeCommandBuilder(conAdap);

conAdap.Fill(dsData);

int r =conAdap.Update(dsData);

Please help me.

Thank you,

Prashant

Hi Prashant - I'm not sure I understand your issue. Could you explain in more detail and also give me somee information about the schema of the table itself? I'm interested in the list of columns, their types, PK, FKs, Indexes, and default values you have assigned on columns.

I'm also interested to know if the table is the product of an RDA pull with tracking on or merge replication article.

thanks,

Darren

No comments:

Post a Comment