I need to be able to determine from the DataTable returned by DbConnection.GetSchema() whether a particular column in a SQL Server table is identity/auto-increment or not.
I have run into the same. As far as I discovered here "An auto increment column is implemented differently depending upon the type of database you are working with. It isn't exposed via GetOleDbSchema.".
I didn't find any other way than @kelloti mentioned. So at the moment I'm fine with this solution because at the moment I need to know if column is .AutoIncrement. I already have the table in memory so I don't need to query the database again.
@pesaak Please convert this answer into a comment now that you should have enough reputation.