I have Arraylist where I have stored names of Tables.I have two datasources one is SQL and one is Access, they have equal number of tabels. I am trying to find Access databse column and datatypes matches to Sql columns and their datatypes not.
I am using Adox and unable to understand what shd I do next.
here is code adn throws error on bold 'column' place
Error Cannot convert type 'char' to 'ADOX.Columns'
Expand|Select|Wrap|Line Numbers
- private void GetColumns()
- {
- string connectionString = (string)ConfigurationManager.ConnectionStrings["SQL"].ConnectionString;
- OleDbConnection myConnection = new OleDbConnection(connectionString);
- myConnection.Open();
- ADOX.CatalogClass cats = new ADOX.CatalogClass();
- cats.let_ActiveConnection(connectionString);
- ADOX.CatalogClass matchcat = new ADOX.CatalogClass();
- matchcat.let_ActiveConnection(connectionString);
- foreach(ADOX.Tables ta in matchcat.Tables)
- {
- foreach (Columns col in ta.ToString())
- {
- }
- }
- }