我试图将列类型更改为自动编号,我通过此查询将某些列更改为文本:
ALTER TABLE table ALTER COLUMN column TEXT(500)
它正在工作,但我无法通过查询将列类型更改为自动编号,
所以我尝试编写代码来更改列类型:
Dim statement As String = String.Format("SELECT * FROM [" & TableName & "]")
Dim command As OleDbCommand = New OleDbCommand(statement, con)
Dim adapter As OleDbDataAdapter = New OleDbDataAdapter(command)
Dim schema As DataTable = New DataTable
adapter.FillSchema(schema, SchemaType.Source)
Dim c As DataColumn = schema.Columns(schema.Columns.Count - 1) //Last Column
adapter.Dispose()
command.Dispose()
schema.Dispose()
所以列是C
(DataColumn),我不知道下一步该做什么......
(我怎样才能将此列类型更改为自动编号(C#/VB.net))