G
Guest
Hello,
I wanted some help on a dataset question. I have created a dataset and datatables and used the dataadapters 'fill' method on them.
In my database the primary key is an autonumber. When i use the fill method and set a datagrid source to my datatable i can see 10 rows. The rows each have a primary key value from 0 to 10 (Autonumbers). When i try to insert a new row into my datatable, the primary key autonumber seems to start at the value 0 rather than continuing from the highest number. i.e 11 onwards. For this reason my inserts into the datatable keep failing. Why does it do this?
Is there anyway i can make the autonumber start from the..... 'highest already generated number' (in this case 10) + 1 ???
Another question
If i have an autonumber coloumn in my database, will this automaticcaly be created for my datatable if i simply use the dataadapters fill method?
thx
I wanted some help on a dataset question. I have created a dataset and datatables and used the dataadapters 'fill' method on them.
In my database the primary key is an autonumber. When i use the fill method and set a datagrid source to my datatable i can see 10 rows. The rows each have a primary key value from 0 to 10 (Autonumbers). When i try to insert a new row into my datatable, the primary key autonumber seems to start at the value 0 rather than continuing from the highest number. i.e 11 onwards. For this reason my inserts into the datatable keep failing. Why does it do this?
Is there anyway i can make the autonumber start from the..... 'highest already generated number' (in this case 10) + 1 ???
Another question
If i have an autonumber coloumn in my database, will this automaticcaly be created for my datatable if i simply use the dataadapters fill method?
thx