update table

  • Thread starter Thread starter Felix González
  • Start date Start date
F

Felix González

Hi,

I`m working with SQLServerCE, and I´ve a table linOrder like this:
create table LinOrder (IDOrder integer not null, NumLin smallint not null,
........"

alter table LinOrder add Constraint CodLinOr primary key (IDOrder, NumLin)";


in .NET I`ve defined a DataSet with a table in the same way. I create a
DataAdapter a d Commanduilder but the update an delete sentece are
erroneous, are somthis like "delete from LinOrder where IDOrder=?" and
where is the numlin? what I doing bad?

thanks
 
When the PK is composite, the CommandBuilder doesn't always return
the correct statements. Best to update the underlying table by hand by
iterating your DataSet table a row at a time and updating the SQL CE table.

Also, there is a sqlce newsgroup for these questions:

microsoft.public.sqlserver.ce

--
Darren Shaffer
..NET Compact Framework MVP
Principal Architect
Connected Innovation
www.connectedinnovation.com
 
Back
Top