Results 1 to 3 of 3

Thread: Get Table name OF Sql Server

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2006
    Posts
    16

    Get Table name OF Sql Server

    AOA
    I want to get SQL SERVER Table names in VB6 (In ODBC driver for sql server I pass database name like: Sale)
    how can i get all table names in a combobox of database Sale.

    thanks & regard

  2. #2
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: Get Table name OF Sql Server

    Welcome to the forum!

    Check out this thread: http://www.vbforums.com/showthread.p...ght=sysobjects

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  3. #3
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    Re: Get Table name OF Sql Server

    Personally, I would use the schema views rather than query the system objects. Much easier to use and they are version specific, so changes to the system objects do not affect your code.

    Select Table_Name From Information_Schema.Tables Where Table_Type = 'BASE TABLE'

Posting Permissions

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



Click Here to Expand Forum to Full Width