dbTalk Databases Forums  

How can I have table and column definitions?

microsoft.public.sqlserver.clients microsoft.public.sqlserver.clients


Discuss How can I have table and column definitions? in the microsoft.public.sqlserver.clients forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
ThunderMusic
 
Posts: n/a

Default How can I have table and column definitions? - 12-01-2006 , 01:50 PM






Hi,
I want to develop a code generator for our Data-Access Layer and I'd like to
know if there are queries I can make to have the table and column
definitions... something like Select * From Tables and Select * From
Columns Where TableName=@TableName.... something like this... I know there
are views in SqlServer 2005... for the Table Definition, I think it's
INFORMATION_TABLES or something like it... there is a similar table for
columns, but some properties are missing, like if the columns is an
Identity...

I also want to know if there is a way to retrieve the relationships like
Table1.Field1-->Table2.Field2 or something like this...

If you have a link to a web site I can find all those informations, go ahead
and post it... but for those who would be tempted, don't post
www.google.com, I already tried to find something useful without any real
success...

Can someone help me please?

Thanks

ThunderMusic



Reply With Quote
  #2  
Old   
Arnie Rowland
 
Posts: n/a

Default Re: How can I have table and column definitions? - 12-01-2006 , 02:01 PM






Now don't go off and 'reinvent the wheel'.

Try these articles:

http://www.theserverside.net/tt/arti...ataSetDesigner
http://www.codegeneration.net/tiki-index.php?page=NET
http://www.codegeneration.net/generators.php

--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc

Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous

You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf


"ThunderMusic" <NoSpAmdanlatathotmaildotcom (AT) NoSpAm (DOT) com> wrote

Quote:
Hi,
I want to develop a code generator for our Data-Access Layer and I'd like
to know if there are queries I can make to have the table and column
definitions... something like Select * From Tables and Select * From
Columns Where TableName=@TableName.... something like this... I know
there are views in SqlServer 2005... for the Table Definition, I think
it's INFORMATION_TABLES or something like it... there is a similar table
for columns, but some properties are missing, like if the columns is an
Identity...

I also want to know if there is a way to retrieve the relationships like
Table1.Field1-->Table2.Field2 or something like this...

If you have a link to a web site I can find all those informations, go
ahead and post it... but for those who would be tempted, don't post
www.google.com, I already tried to find something useful without any real
success...

Can someone help me please?

Thanks

ThunderMusic




Reply With Quote
  #3  
Old   
ThunderMusic
 
Posts: n/a

Default Re: How can I have table and column definitions? - 12-01-2006 , 03:20 PM



because I want to add my own things in it... and because we will probably
generate 100's of classes, I don't want to cut and paste my things in all
these classes... with my code generator, I'll be sure the classes reflect
exactly what we really need.

thanks tought, those links may be helpful...

ThunderMusic


"Arnie Rowland" <arnie (AT) 1568 (DOT) com> wrote

Quote:
Now don't go off and 'reinvent the wheel'.

Try these articles:

http://www.theserverside.net/tt/arti...ataSetDesigner
http://www.codegeneration.net/tiki-index.php?page=NET
http://www.codegeneration.net/generators.php

--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc

Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous

You can't help someone get up a hill without getting a little closer to
the top yourself.
- H. Norman Schwarzkopf


"ThunderMusic" <NoSpAmdanlatathotmaildotcom (AT) NoSpAm (DOT) com> wrote in message
news:u6BSHIYFHHA.1240 (AT) TK2MSFTNGP03 (DOT) phx.gbl...
Hi,
I want to develop a code generator for our Data-Access Layer and I'd like
to know if there are queries I can make to have the table and column
definitions... something like Select * From Tables and Select * From
Columns Where TableName=@TableName.... something like this... I know
there are views in SqlServer 2005... for the Table Definition, I think
it's INFORMATION_TABLES or something like it... there is a similar table
for columns, but some properties are missing, like if the columns is an
Identity...

I also want to know if there is a way to retrieve the relationships like
Table1.Field1-->Table2.Field2 or something like this...

If you have a link to a web site I can find all those informations, go
ahead and post it... but for those who would be tempted, don't post
www.google.com, I already tried to find something useful without any real
success...

Can someone help me please?

Thanks

ThunderMusic






Reply With Quote
  #4  
Old   
Arnie Rowland
 
Posts: n/a

Default Re: How can I have table and column definitions? - 12-01-2006 , 03:53 PM



I thought the links might give you ideas, if not even code...

--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc

Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous

You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf


"ThunderMusic" <NoSpAmdanlatathotmaildotcom (AT) NoSpAm (DOT) com> wrote

Quote:
because I want to add my own things in it... and because we will probably
generate 100's of classes, I don't want to cut and paste my things in all
these classes... with my code generator, I'll be sure the classes reflect
exactly what we really need.

thanks tought, those links may be helpful...

ThunderMusic


"Arnie Rowland" <arnie (AT) 1568 (DOT) com> wrote in message
news:OtThwNYFHHA.5000 (AT) TK2MSFTNGP03 (DOT) phx.gbl...
Now don't go off and 'reinvent the wheel'.

Try these articles:

http://www.theserverside.net/tt/arti...ataSetDesigner
http://www.codegeneration.net/tiki-index.php?page=NET
http://www.codegeneration.net/generators.php

--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc

Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous

You can't help someone get up a hill without getting a little closer to
the top yourself.
- H. Norman Schwarzkopf


"ThunderMusic" <NoSpAmdanlatathotmaildotcom (AT) NoSpAm (DOT) com> wrote in message
news:u6BSHIYFHHA.1240 (AT) TK2MSFTNGP03 (DOT) phx.gbl...
Hi,
I want to develop a code generator for our Data-Access Layer and I'd
like to know if there are queries I can make to have the table and
column definitions... something like Select * From Tables and Select *
From Columns Where TableName=@TableName.... something like this... I
know there are views in SqlServer 2005... for the Table Definition, I
think it's INFORMATION_TABLES or something like it... there is a
similar table for columns, but some properties are missing, like if the
columns is an Identity...

I also want to know if there is a way to retrieve the relationships like
Table1.Field1-->Table2.Field2 or something like this...

If you have a link to a web site I can find all those informations, go
ahead and post it... but for those who would be tempted, don't post
www.google.com, I already tried to find something useful without any
real success...

Can someone help me please?

Thanks

ThunderMusic








Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.