AutoIncrement not incrementing

M

moondaddy

I have a dataset with about 12 tables in it. I'm using this to support a
little demo app I'm building for proof of concept for a potential client and
there's no backend database involved. When I add record to a to the dataset
table all goes well except the autoincrement field stays at zero. this is
also the PK field for the table. I set the AutoIncrement property to True,
AutoIncrementSeed to 1 and AutoIncrementStep to one but its still not added
a value. I even removed all the data from the table and tried again to no
avail. also just after I add the datarow to the table I all the
AcceptChanges() method but that didn't seem to have any effect.

Can anyone help me trouble shoot this?

Thanks.
 
M

moondaddy

I found the problem. I had a standard business object handling the dataset
and when it added the new values to it, it was adding a value of zero to the
autoincrement field. Normally this is OK because this value gets passed
back to the db and it knows to do inserts when the PK = 0. All works good
now.
 

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

Top