Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2004
    Posts
    40

    Unanswered: 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

  2. #2
    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.

  3. #3
    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

  4. #4
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •