Hello,
I am trying to pull the relationships from an Access database. I would like to know which fields have what type of relation with other tables in the database. Does anyone know how to do this?

Thanks,
Ben

Fairly simple answer to this (pseudo VB.net code, just get connected and create a data grid view):

Dim dt As DataTable

     dt =conn.GetOleDbSchemaTable( _
     System.Data.OleDb.OleDbSchemaGuid.Foreign_Keys,Nothing)

     DataGridView1.DataSource = dt
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.