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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

identity column 1
EF Designer ignores my foreign key 4
Failed to enable constraints 1
CommandBuilder Question... 2
insert into detal table 2
ADO.NET create table 10
SqlceDataAdapter.Update 2
Designing a code table 2

Back
Top