[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Lloyd Dupont

10/1/2003 5:37:00 AM

let's say I want to display in an editable DataGrid some data from a table
with an autoincrement primary key column.
for this I create a DataTable, I fetch part of the database data into it and
set its DataView to be the DataSource of a DataGrid.

now the problem is:
this DataTable, being editable, should contain some correct key information,
to be able to update with the database

this column, by property of the primary key, can't be null, but the value
which the user will put in it or that I will automaticaly write would be
wrong to and my update will fail, wouldn't it ?

how do I handle that ?
(handle autoincrement prinary key in the DB with an editable DataTable which
show but a part of the datas) ????