PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft ADO .NET
trouble with primary key element in a dataset
Forums
Newsgroups
Microsoft DotNet
Microsoft ADO .NET
trouble with primary key element in a dataset
![]() |
trouble with primary key element in a dataset |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
Hi,
I've got a dataset containing two elements in a table called tblCollection: Collection_ID and CollectionName. Collection_ID is an int (not an autonumber). In my stored procedure that inserts a new record, I create a new unique id. I use 4 stored procedures to get and save the data because I want to perform some tests. So I bind the dataset to a datagrid (I only show the Collection column), but I can't insert any new row because of the null value of the Collection_ID, even when I set the nullability true in the dataset properties of that Collection_ID element. When I use default value 0, I can only create one new record because (offcourse) the Collection_ID must be unique Has anybody a solution? Thanks a lot, Filip |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

