0

When I am running this code its also retrieving some other fields which are not present in a table. How to overcome this?

Dim conn As New OleDb.OleDbConnection 'Create a connection string for an Access database Dim strConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=F:\check\a.mdb" 'Attach the connection string to the connection object conn.ConnectionString = strConnectionString 'Open the connection conn.Open() Dim Restrictions() As String = {Nothing, Nothing, selected, Nothing} 'selected contains the name of table 
 Dim CollectionName As String = "Columns" Dim dt As DataTable = conn.GetSchema(CollectionName, Restrictions) For Each TableRow As DataRow In dt.Rows ComboBox1.Items.Add(TableRow.Item("COLUMN_NAME"))

The additional schema which is also retrieved are.

  1. ID
  2. Date create
  3. Date update
  4. Id
  5. Lv
  6. Name
  7. parent Id
  8. Type
  9. GUID
  10. Id

And are 6 more columns, original schema is of only 5 columns

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
  • my problem is not solved yet and nobody gives the solution for it thats why i ask this – Anish choudhary Dec 29 '15 at 11:15
  • If you are not receiving satisfactory answers for an existing question you should edit that question to improve it rather than simply asking the same question again. – Gord Thompson Dec 29 '15 at 12:49

0 Answers0