Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Saving Host Variable Values in a Class ?
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;
.
.
.
}
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
![]() |
![]() |