Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can an identity column be zero?
Message
From
28/11/2010 11:00:55
 
 
To
27/11/2010 18:07:10
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 2008
Miscellaneous
Thread ID:
01490715
Message ID:
01490754
Views:
53
Thanks, Naomi Sergey,and Kevin

The question was provoked by another one:

I'm wondering what's the best (translate that - reliable and least work for me) way to determine whether a row in a datatable that contains an identity column was inserted by my C# program or was originally extracted from a SQL server row.
When browsing the datatable in the debugger, I see a -1 in the rows that I've created


Can I say that if it's less than 0, it was inserted by me and vice versa?

Is that logic OK? Is there a better way?


>>checked the documentation and can't find an answer to this.
Will an identify column ever have a value of zero?
I note that when I add the first record, it's 1.
Anyone who does not go overboard- deserves to.
Malcolm Forbes, Sr.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform