DataSet Issue : How do I add a Row to a DataTable with Identity Column 
Author Message
 DataSet Issue : How do I add a Row to a DataTable with Identity Column

I am trying to update the dataset.  However, I am not able to add a row due
to a missing column value of the id column.  This column is an identity
colum and does not allow for null values.


Mon, 28 Mar 2005 22:12:13 GMT  
 DataSet Issue : How do I add a Row to a DataTable with Identity Column
L. M. Vasconcelos... Just delete any reference to the Identity column in
the INSERT statement. If you _must_ specify the identity you can do:

SET IDENTITY_INSERT tablename ON

Probably not what you want to do.

If all else fails. Sneak into your favorite book store and read page 103
of Transact-SQL Programming O'Reilly.

Regards,
Jeff

Quote:
>I am trying to update the dataset. However, I am not able to add a row

due to a missing column value of the id column. This column is an
identity colum and does not allow for null values.<

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Tue, 29 Mar 2005 05:38:46 GMT  
 DataSet Issue : How do I add a Row to a DataTable with Identity Column
Thanks for the help.  I'll give it a shot

Quote:
> L. M. Vasconcelos... Just delete any reference to the Identity column in
> the INSERT statement. If you _must_ specify the identity you can do:

> SET IDENTITY_INSERT tablename ON

> Probably not what you want to do.

> If all else fails. Sneak into your favorite book store and read page 103
> of Transact-SQL Programming O'Reilly.

> Regards,
> Jeff
> >I am trying to update the dataset. However, I am not able to add a row
> due to a missing column value of the id column. This column is an
> identity colum and does not allow for null values.<

> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!



Wed, 30 Mar 2005 03:05:27 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. passing a SQL datareader or dataset with 1000 rows and 10 columns

2. Thread-safe DataTable.Rows.Add

3. DataGrid/DataTable - event before row added?

4. Adding row to dataTable

5. Add Row dynamically to the beginning of datatable in a datagrid

6. column data of a datarow loss after added into datatable

7. Add columns to DataTable

8. Adding A New Row To A Dataset

9. Adding a new virtual/temporary column to different tables via a DataSet

10. Access violation adding row to empty table with datetime column, heap version only

11. Adding Columns and Rows in Microsoft Datagrid Control 6.0

12. Dataset with Identities

 

 
Powered by phpBB® Forum Software