A
A.M-SG
Hi,
I have a strongly typed DataTable that represent a table with database with
a primary key.
I am trying to use the DataTable to add a new row to the database table by
using a DataAdapter. Since the primary key is autonumber, I have to leave
the primary key column blank, so my insert stored procedure can return the
key to the DataAdapter and DataAdapter assign the key value back to the
DataTable column through the output parameter.
I assume that above process is standard way to insert rows by using typed
DataTables.
The problem is that I cannot insert a new row with blank primary key into
the typed DataTable. I am sure that I am missing a small point. How can I
add a new row without primary key value into the column?
Any help would be appreciated,
Alan
I have a strongly typed DataTable that represent a table with database with
a primary key.
I am trying to use the DataTable to add a new row to the database table by
using a DataAdapter. Since the primary key is autonumber, I have to leave
the primary key column blank, so my insert stored procedure can return the
key to the DataAdapter and DataAdapter assign the key value back to the
DataTable column through the output parameter.
I assume that above process is standard way to insert rows by using typed
DataTables.
The problem is that I cannot insert a new row with blank primary key into
the typed DataTable. I am sure that I am missing a small point. How can I
add a new row without primary key value into the column?
Any help would be appreciated,
Alan