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

Home -> Community -> Usenet -> c.d.o.misc -> Saving Host Variable Values in a Class ?

Saving Host Variable Values in a Class ?

From: Christofer Dutz <dutz_at_danet.de>
Date: Tue, 06 Jul 1999 11:47:13 +0200
Message-ID: <3781D0A1.7B65D587@danet.de>


Hi again :-)

At the moment I am sort of finishing the work of a programmer who started creating a JDBC-like class-set for C++ and am making the whole thing multithreading safe. Everything is working absolutely fine. In order to make the thing work with threads I sort of have to define the Host variables in each function, so I have to place a second set of variables in the class deffinition and always assign these saved values at the biginning of each function.

Example :

class XYZ{
.

     void X();
.

private:

    VARCHAR userName;
    VARCHAR password;
    sql_context threadContext;
.
.
.

};

void XYZ::X()
{

    EXEC SQL BEGIN DECLARE SECTION;

        VARCHAR tempUserName;
        VARCHAR tempPassword;
        sql_context  tempThreadContext;
    EXEC SQL END DECLARE SECTION;     tempUserName = userName;
    tempPassword = password;
    tempThreadContext = threadContext;

.
.
.

}

Is there a way to avoid having to do this in every function ?

Thanx in advance

    Christofer Dutz
    Danet GmbH
    Germany Received on Tue Jul 06 1999 - 04:47:13 CDT

Original text of this message

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