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

Ns_DbPoolGetHandle

Overview

Get database handle from pool

Syntax

    Ns_DbHandle *Ns_DbPoolGetHandle(
    	char *poolname
    );

Description

The Ns_DbPoolGetHandle function gets a database handle from the pool specified by poolname. It returns NULL on error. Details relating to error conditions are written to the server log. You must request all the database handles you will need for a specific pool with one call to Ns_DbPoolGetHandle (if you need only one handle) or Ns_DbPoolGetMultipleHandles (if you need more than one handle).

Example

    Ns_DbHandle *handle;
    if ((handle = Ns_DbPoolGetHandle("aPoolName")) != NULL) {
    	Ns_Set *row;
    	row = Ns_DbSelect(handle, "select * from aTable");
    	...

}

Top of Page

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