Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


OpenSchema in VB .NET

Posted on 2006-11-21
Medium Priority
Last Modified: 2008-03-03
Does anyone have some sample VB .NET code that shows how to use OpenSchema?

My intent is to ask a database what tables are inside of it.

Then to take that list of tables and ask each table what the column names are that it has.
Question by:Tom Knowlton
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
LVL 16

Expert Comment

ID: 17990848
Hi knowlton,

Are you using this for an Analysis Services cube?  If not I'm not sure if OpenSchema is what you want.

If you just want a list of all tables in the (assuming SQL Server 2000) database, use:

select name, id from sysobjects where xtype = 'U'  

then to get all of the column names, use:

select name from syscolumns where id = <id from previous query>


Author Comment

by:Tom Knowlton
ID: 17990857
What about if it is an MS Acess MDB file?
LVL 16

Accepted Solution

Hillwaaa earned 2000 total points
ID: 17990906

Then I'd suggest looking at the code here:

It's VB6 but should be fairly easy to translate to VB .NET, and contains an example on using OpenSchema :)

Author Comment

by:Tom Knowlton
ID: 17992109
Thank you.
LVL 16

Expert Comment

ID: 17992113
No worries!

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question