C API Reference -- Ns_DbPoolTimedGetHandle

### Ns_DbPoolTimedGetHandle

#### Overview

Get database handle from pool with timeout

#### Syntax

        Ns_DbHandle *Ns_DbPoolTimedGetHandle(
        char *poolname,
        int timeout
        );

#### Description

The Ns_DbPoolTimedGetHandle function gets a database handle from the pool specified by `poolname`. If a `timeout` is not specified or `timeout` is zero, it will wait indefinitely (perhaps forever) for the handle to become available. If `timeout` is greater than zero, it will either return with the handle within that time period, or return "" if the time period was exceeded. If `timeout` is less than zero, it will not block.

It returns NULL on error or if the attempt times out. 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_DbPoolTimedGetHandle (if you need only one handle) or Ns_DbPoolGetTimedMultipleHandles (if you need more than one handle). You must release all your database handles explicitly (with Ns_DbPoolPutHandle) before acquiring more.

#### See Also

Ns_DbPoolGetHandle

Top of Page
Copyright © 1998-99 America Online, Inc.