BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

getting table structures

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (SQL Servers)
View previous topic :: View next topic  
Author Message
Russ Holcomb
Guest





PostPosted: Thu Feb 09, 2006 4:03 pm    Post subject: getting table structures Reply with 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
Brian Hollister
Guest





PostPosted: Thu Feb 09, 2006 4:03 pm    Post subject: Re: getting table structures Reply with quote



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





PostPosted: Thu Feb 09, 2006 4:03 pm    Post subject: Re: getting table structures Reply with quote



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





PostPosted: Thu Feb 09, 2006 6:03 pm    Post subject: Re: getting table structures Reply with quote

"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





PostPosted: Thu Feb 09, 2006 9:03 pm    Post subject: Re: getting table structures Reply with quote

//-- 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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (SQL Servers) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.