473,405 Members | 2,445 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

get Datatype with the help of ADOX

parshupooja
159 100+
Hey all,

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
  1. private void GetColumns()
  2.     {
  3.              string connectionString = (string)ConfigurationManager.ConnectionStrings["SQL"].ConnectionString;
  4.  
  5.           OleDbConnection myConnection = new OleDbConnection(connectionString);
  6.         myConnection.Open();
  7.         ADOX.CatalogClass cats = new ADOX.CatalogClass();
  8.         cats.let_ActiveConnection(connectionString);       
  9.  
  10.           ADOX.CatalogClass matchcat = new ADOX.CatalogClass();
  11.            matchcat.let_ActiveConnection(connectionString);
  12.            foreach(ADOX.Tables ta in matchcat.Tables)
  13.            {
  14.                foreach (Columns col in ta.ToString())
  15.                {
  16.  
  17.                }
  18.            }
  19.  
  20.     }
Thanks
Mar 24 '08 #1
0 1109

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Developer98115 | last post by:
I need help getting schema information from an existing SQL Server database. My thought was that you could use ADOX via InterOp. Has anyone done this successfully and how? I have created a...
2
by: Developer98115 | last post by:
I need help getting schema information from an existing SQL Server database. My thought was that you could use ADOX via InterOp. Has anyone done this successfully and how? I have created a...
3
by: gaffar | last post by:
Sir, Using ADOX I am developing an application in vb.net and the backend database is ms-access. i have created ms-access databse and tables and assigned primary keys to the tables through the...
1
by: Hexman | last post by:
I'm creating a new Access table using ADOX. I can add columns and indexes, but I'm baffled on how to change field properties. Can someone give me a hand? Want to change properties such as:...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.