If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > SQL db table attributes display with ASP

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-01-04, 13:10
JimWa JimWa is offline
Registered User
 
Join Date: Jan 2004
Posts: 40
SQL db table attributes display with ASP

Using ASP does anyone know how to or have a good tutorial on how to retireve the database table names, column names and data format with a SQL Server database?

Any help would be greatly appreciated.

Thanks
Reply With Quote
  #2 (permalink)  
Old 04-08-04, 02:23
sgravi sgravi is offline
Registered User
 
Join Date: Apr 2004
Posts: 2
Smile

You plz try with sysobjects table wherein you can get maximum
info about the table in that db.

For example to get the no of columns

<%
rsobj.open "select info from sysobjects where name="tablename"",connobj
Response.write("No of columns in "tablename" is " + rs("info"))
%>

is that anything else i could do
if this is not the one you need plz lemme know.
Reply With Quote
  #3 (permalink)  
Old 04-08-04, 03:00
MrWizard MrWizard is offline
Registered User
 
Join Date: Mar 2003
Location: Atlanta, GA
Posts: 191
Re: SQL db table attributes display with ASP

There's a FREE tool at 1ClickDB.com that handles web based database table management. They also sell a commercial version.

The 1ClickDbFree version provides some excellent insight into how to query Access, MSSQL and Oracle databases for table names and details.

Go to 1clickbd.com and look in the upper right corner for the Free tool link.

Tim
__________________
Tim
Reply With Quote
  #4 (permalink)  
Old 04-12-04, 09:56
thele thele is offline
Registered User
 
Join Date: Jun 2003
Location: Ohio
Posts: 108
Post yup.

Yes, you can do this:

select * From MyDBName.information_schema.columns

Replace MyDBName with the database you wish to search. That will give you the 411 on all the tables in that database.

Personally, I recommend you make a new table called "DbSchema" and manually enter that information there, and keep it updated.

~Le
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On