check if a table column has identity turned on with vb.net
Posted on 2008-10-26
i have a windows form application using visual studio 2008 and sql server 2005.
i am connecting to a sql server 2005 database, called "test" and a table "mytable"
it has 5 fields. id,name,surname,age,comments. the id column has a identity-autonumber turned on with an identity number of 1.
i want to have a button in my form and a textbox. when clicking the button i want to connect to the database(local in my sql server-sqlexpress) and if the table has a column with identity, to return the name of the column in the textfield. in this example to return the value "id" in the textfield, thus this is the column with identity turned on. i want to use vb.net-2005