Looping throught database tables

Results 1 to 2 of 2

Thread: Looping throught database tables

  1. #1
    Join Date
    Dec 1969

    Default Looping throught database tables

    Does anyone know a way of looping through all the tables in a database after a connection to the database has been made. I need to do this for the administrator page within my site.<BR><BR>Cheers<BR><BR>Andy

  2. #2
    Join Date
    Dec 1969

    Default use sysobjects table

    select all the records in the sysobject table in your database where xtype = &#039;u&#039;<BR><BR>SELECT name FROM sysobjects WHERE xtype = &#039;u&#039; <BR><BR>which happen to be all the table objects in your database..<BR><BR>and then you can put them in an array, and loop on that array;<BR>sending the table name stored in each item to use that table in the way you want.<BR><BR>i know it wasn&#039;t much of an answer..but this is what i got ..i hope you benifit of it :( ... :D

Posting Permissions

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