Rik78


Hi

I have a table with an identity column. This is set to increase by 1 and start on 1, and is the first column of the table.

When I insert a record into the resultset, I get an error stating that it can't be DbNull.

Th record is created from a resultset with the query "Select * from table", so the id should be included

But as I understand it, it should be increasing automatically, right Becuase that's the behaviour of the normal sql Insert command. I have seen an article that just left the id column in the record alone before inserting it, but it didn't help me.

How can I sidestep this issue





Re: Insert Identity value with SqlCeResultSet

ErikEJ


Use tabledirect instead of select * from table, see this sample from Joao:

http://www.pocketpcdn.com/articles/articles.php &atb.set(c_id)=74&atb.set(a_id)=11078&atb.perform(details)=&