[ Previous ] [ Contents ] [ Index ] [ Next ]

Ns_DbTableList

Overview

Get a list of tables in database

Syntax

    char *Ns_DbTableList (
    	Ns_DString  *pds,
    	Ns_DbHandle *handle,
    	int          includesystem
    );

Description

The Ns_DbTableList function returns a list of tables in the database referred to by handle. The includesystem argument indicates whether to include system tables in this list. Upon completion, the returned pointer points to a list of tables in the following format:

    "table1\0table2\0table3\0\0"

Example

    char *tables;
    Ns_DbHandle *handle;
    Ns_DString ds;
    Ns_DStringInit(&ds);
    if ((handle = Ns_DbPoolGetHandle("aPoolName")) != NULL) {
    	tables = Ns_DbTableList(&ds, handle, 1);
    	while (*tables != '\0') {
       		printf("%s\n", tables);
       		tables += strlen(tables) + 1;
    	}
    	Ns_DStringFree(&ds);
    }

Top of Page

[ Previous ] [ Contents ] [ Index ] [ Next ]
Copyright © 1996 America Online, Inc.