Hi,
In following sample code dbTest connects to MS Access 2k database. I am showing all the fields in Table1 to list2 listbox.
List2.Clear
str = "Table1"
Set tdtest = dbTest.TableDefs(str)
For Each fdtest In tdtest.Fields
List2.AddItem fdtest.Name
str$ = fdtest.Type
Next
My question is if field1, field2, field3 are present in Table1 then how to detect at run time which field is the primary key?
Also please tell me, how to do above using ADO?
Thank you for your time,
pjani
In following sample code dbTest connects to MS Access 2k database. I am showing all the fields in Table1 to list2 listbox.
List2.Clear
str = "Table1"
Set tdtest = dbTest.TableDefs(str)
For Each fdtest In tdtest.Fields
List2.AddItem fdtest.Name
str$ = fdtest.Type
Next
My question is if field1, field2, field3 are present in Table1 then how to detect at run time which field is the primary key?
Also please tell me, how to do above using ADO?
Thank you for your time,
pjani