Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> SQLDA and STL

SQLDA and STL

From: Alex Vinokur <alexander.vinokur_at_telrad.co.il>
Date: Thu, 11 Nov 1999 14:00:15 GMT
Message-ID: <80ei5d$pbl$1@nnrp1.deja.com>

Here is the SQLDA (SQL Descriptor Area) structure

        used in dynamic SQL programs in databases.

struct SQLDA
{

    long    N;          /* Descriptor size in number of entries */
    char  **V;     /* Ptr to Arr of addresses of main variables */
    long   *L;              /* Ptr to Arr of lengths of buffers */
    short  *T;                /* Ptr to Arr of types of buffers */
    short **I;     /* Ptr to Arr of addresses of indicator vars */
    long    F;         /* Number of variables found by DESCRIBE */
    char  **S;          /* Ptr to Arr of variable name pointers */
    short  *M;       /* Ptr to Arr of max lengths of var. names */
    short  *C;    * Ptr to Arr of current lengths of var. names */
    char  **X;         /* Ptr to Arr of ind. var. name pointers */
    short  *Y;  /* Ptr to Arr of max lengths of ind. var. names */
    short  *Z;  /* Ptr to Arr of cur lengths of ind. var. names */
};

That is C language structure.
Using SQLDA, we have to

Is it planed to create new SQLDA structure (class)

        based on STL (Standard Template Library)? Something like this :

class SQLDA_based_on_STL
{

   private :

        long                    N; // Descriptor size in number of
entries
        vector<string>          V; // Vector of main variables
        vector<long>            L; // Vector of lengths of
buffers
        vector<long>            T; // Vector of types of buffers
        vector<vector<short> >  I; // Matrix of addresses of indicator
vars
        long                    F; // Number of variables found by
DESCRIBE
        vector<string>          S; // Vector of variable names
        vector<short>           M; // Vector of max lengths of var.
names
        vector<short>           C; // Vector of current lengths of var.
names
        vector<string>          X; // Vector of ind. var. name
        vector<short>           Y; // Vector of max lengths of ind. var.
names
        vector<short>           Z; // Vector of cur lengths of ind. var.
names

   public :

        SQLDA_based_on_STL ();
        // Stuff

};

Advantages of STL are well-known.

Such a class will enable us to avoid taking care of storage management.

        Alex

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Thu Nov 11 1999 - 08:00:15 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US