473,406 Members | 2,698 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,406 software developers and data experts.

Database schema using GetSchema

JPS
I tried using GetSchma to return all of the tables in the database, but
this doesn't seem to work. What I am trying to do is get schema
information on all of the tables in one databes and then all of the
fields in each table and their properties.
Can anyone show me a code sample of how to do this besides the
MSFTexamples which tell me nothing.?

Nov 7 '06 #1
1 3176
In Sql Server:
Select * From Information_Schema.Tables
gets all tables

Select * From Information_Schema.[Columns]
gets all columns in all tables (with data types etc)

You can use normal where clauses etc on these.

HTH

Ciaran O'Donnell
"JPS" wrote:
I tried using GetSchma to return all of the tables in the database, but
this doesn't seem to work. What I am trying to do is get schema
information on all of the tables in one databes and then all of the
fields in each table and their properties.
Can anyone show me a code sample of how to do this besides the
MSFTexamples which tell me nothing.?

Nov 8 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Peter Nofelt | last post by:
Hey all, I want to return an xml structure without .net trying to inject any of its xml schema? Can this be done? Here is the scenario: I'm running into an issue with the return string of my...
1
by: TimMcConechy | last post by:
Hi, In a trigger I need to do a SET CURRENT SCHEMA so that I update the right set of tables based on some "new" values I recieve in the trigger.. the logic looks a little like: DECLARE...
4
by: Ricardo Luceac | last post by:
How can I get the names of the tables within a database?? thx... *** Sent via Developersdex http://www.developersdex.com ***
17
by: Sam Malone | last post by:
I am trying to get details from a database. I really want to use only native VS.NET managed code "stuff" (just cuz I want to) and avoid any interop stuff. So, I'm trying to do this without using...
6
by: Baal80 | last post by:
Hello, I've managed to read an sql type from the database (using a kind of virtual commandbuilder and SqlDbType method) but I'm not able to retrieve exact data type (eg. maximum length of a...
2
by: John Sutor | last post by:
Does anyone know what objects to use to query a SQL database to get back all of the tables and then be able to get information on the tables and column information (name, datatype, max length...
0
by: Wiebe Tijsma | last post by:
Hi all, Is it possible to export the W3C Schema from an XmlSerializer instance? I know the IXmlSerializable interface has a GetSchema() method, but what if my objects don't implement the...
3
by: h4xPace | last post by:
I am building a MySQL query application, and I have run into a small snag. MySQL has released a set of classes that extend the .NET framework base data classes (command, connection, etc), and I am...
9
by: Peter Duniho | last post by:
Is there a straightfoward API in .NET that allows for inspection of a database? That is, to look at the structure of the database, without knowing anything in advance about it? For example,...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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.