 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Russ Holcomb Guest
|
Posted: Thu Feb 09, 2006 4:03 pm Post subject: getting table structures |
|
|
We need to be able to easily get the database structure in SQL Server 2000.
Stuff like tables, fields, indexes. We need to let the user pick a table
and then pick the fields they want. We can find no documentation on this.
Can anybody point me in the right direction?
Thanks
Russ |
|
| Back to top |
|
 |
Brian Hollister Guest
|
Posted: Thu Feb 09, 2006 4:03 pm Post subject: Re: getting table structures |
|
|
If your using ADO, lookup TADOConnection.OpenSchema
--
Got a big event coming up? Let us
help coordinate your event. For more
visit www.kissemgoodbye.com
"Martijn Tonies" <m.tonies (AT) upscene (DOT) removethis.com> wrote in message
news:43eb58da$1 (AT) newsgroups (DOT) borland.com...
| Quote: |
We need to be able to easily get the database structure in SQL Server
2000.
Stuff like tables, fields, indexes. We need to let the user pick a
table
and then pick the fields they want. We can find no documentation on
this.
sysobjects and tables like that...
--
Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL
Server
Upscene Productions
http://www.upscene.com
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com
Can anybody point me in the right direction?
Thanks
Russ
|
|
|
| Back to top |
|
 |
Martijn Tonies Guest
|
Posted: Thu Feb 09, 2006 4:03 pm Post subject: Re: getting table structures |
|
|
| Quote: | We need to be able to easily get the database structure in SQL Server
2000.
Stuff like tables, fields, indexes. We need to let the user pick a table
and then pick the fields they want. We can find no documentation on this.
|
sysobjects and tables like that...
--
Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL
Server
Upscene Productions
http://www.upscene.com
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com
| Quote: | Can anybody point me in the right direction?
Thanks
Russ
|
|
|
| Back to top |
|
 |
Kevin Frevert Guest
|
Posted: Thu Feb 09, 2006 6:03 pm Post subject: Re: getting table structures |
|
|
"Russ Holcomb" <reholcomb (AT) earthlink (DOT) net> wrote in message
news:43eb557f$1 (AT) newsgroups (DOT) borland.com...
| Quote: | We need to be able to easily get the database structure in SQL Server
2000. Stuff like tables, fields, indexes. We need to let the user pick a
table and then pick the fields they want. We can find no documentation on
this. Can anybody point me in the right direction?
|
Look up 'Information Schema Views' in Books Online.
Good luck,
krf |
|
| Back to top |
|
 |
Steve Zimmelman Guest
|
Posted: Thu Feb 09, 2006 9:03 pm Post subject: Re: getting table structures |
|
|
//-- Table List
q_Tables.SQL.Text := 'Exec sp_Tables' ;
q_Tables.Open ;
//-- Table Columns
q_Fields.SQL.Text := 'Exec sp_columns ['+TableName+']' ;
q_Fields.Open ;
//-- Indexes
q_Indexes.SQL.Text := 'exec sp_helpindex '['+TableName+']' ;
q_Indexes.Open ;
//-- Primary Keys
q_PKeys.SQL.Text := 'Exec sp_pkeys ['+TableName+']' ;
q_PKeys.Open ;
-Steve-
"Russ Holcomb" <reholcomb (AT) earthlink (DOT) net> wrote in message
news:43eb557f$1 (AT) newsgroups (DOT) borland.com...
| Quote: | We need to be able to easily get the database structure in SQL Server
2000. Stuff like tables, fields, indexes. We need to let the user pick a
table and then pick the fields they want. We can find no documentation on
this. Can anybody point me in the right direction?
Thanks
Russ
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|