In my application I would like to able to add a column to a database (without primary key) wich has to be the primary key. this is how I do this:

Dim cmd As New Odbc.OdbcCommand
cmd.CommandText = "ALTER TABLE Crawford_nl ADD COLUMN " & "[Index]" & " COUNTER PRIMARY KEY"
cmd.CommandType = CommandType.StoredProcedure
cmd.Connection = Me.OdbcConnection1'
Try
cmd.ExecuteNonQuery()
Catch ex As Exception
MsgBox(Err.Description)
Me.OdbcConnection1.Close()
Exit Sub
End Try

This is not a problem when the database doesn't already contain a field wich is autonumbered (because the database can not contain 2 autonumbered fields). But some databases we receive contain an autonumbered field wich is not the primary key. In that case it would be easier to just make that field primary key. Is there a way I can determine wether a field is autonumbered or not?

Tnx in advance