I have a MsAccess database (.mdb) located in D drive as (D:\project.mdb).Database have more than 120 Tables. There is a table Records which have primary key and multiple fields. I want to get the Columns,ColumnType and PrimaryKey.
I am getting fields and its type using :
Dim TableNm_ As String = "Records"Dim restrictions2() As String = {Nothing, Nothing, TableNm_, Nothing} Dim DataTable2 As System.Data.DataTable = conn.GetSchema("Columns", restrictions2)
But it did not have PrimayKey Column.
I have gone through several SO posts and others like GetSchema and PrimaryKey column. But i do not want to create a command and Reader to read the key.
Is there any way to get PrimayKey Column of table Records only, using conn.GetSchema ?