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

Ns_PdFreeRowInfo

Overview

This function frees an Ns_PdRowInfo data structure.

Syntax

    void  Ns_PdFreeRowInfo(Ns_PdRowInfo * rowInfo, int fFreeData)

Description

If fFreeData is a non-zero value, then this function frees the data associated with the Ns_PdRowData structure (encapsulated in Ns_PdRowInfo) as well.

Psuedo-code Example

    /* Things italicized would be your DBMS-specific structures and 
calls. */
    /* defined in nspd.h */ 
    typedef struct Ns_PdRowData {
    int elSize;
    char *elData;

} Ns_PdRowData; typedef struct Ns_PdRowInfo { int numColumns; Ns_PdRowData *rowData; }; void DBMSFunction (void) { Ns_PdRowInfo *getRowInfo, *bindRowInfo; if ((bindRowInfo = DBMSBindRow(state)) != NULL) { if ((getRowInfo = Ns_PdNewRowInfo(Ns_PdGetRowInfoNumColumns(bindRowInfo))) != NULL) { /* process getRowInfo */ /* ... */ /* free the getRowInfo structure when done */ Ns_PdFreeRowInfo(getRowInfo, 0); } /* free the bindRowInfo data and structure when done */ Ns_PdFreeRowInfo(bindRowInfo, 1); } }

Top of Page

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