I need to know in C# if a column of a Table in SQL Server 2005 is autonumeric. I know that if I make a query to get a DataTable and I go through the columns, I could use something like
if (table.Columns[i].AutoIncrement) bla bla
The problem is that AutoIncrement is always false, even when the column is an Identity and autoincrement column, and I don't know how to find out this, besides this way.
I would like to know the same for an Access database, though.
Thank you very much!!