home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
dbutil.zip
/
BUFOP.ZIP
/
CSQLTYPE.HPP
< prev
next >
Wrap
Text File
|
1993-09-01
|
2KB
|
57 lines
#include <IString.hpp>
#include <IDate.hpp>
#include <ITime.hpp>
/*******************************************************************
* C S Q L T Y P E s
* Types needed in support of IBM CPP & tools
*
* Support for IDATE, ITIME & ISTRING is provided by
* inheriting the above types and providing a function
* to transform the data type into one of the tools types
*
* ALSO - CLASS vchar is provided for variable char with 2-byte length
*
*********************************************************************
class vchar // var length char with 2byte length
// N O T E This call is not intened to be very robust
// IT IS ONLY INTENDED TO GET DATA INTO AND OUT OF
// THE DATABASE AND SERVER AS A BASIS FOR
// NSTRING AND ZSTRING
{
int len; // amount allocated
char * theStr; // the pointer to the allocated string
public:
vchar(); // default constructor
vchar(int len); // construct & allocate
~vchar(); // destructor;
void setLen(int len); // allocate new
void setV(short sqldaID, short index);
}
class ZString : public IString, public vchar
{
public:
void setData(); // moves data from vchar to IString after read
void setV(short sqldaID, short index, Boolean input); // redefine of setv
}
class dIDate : public IDate
{
char theDate[11];
public:
setDate();
setV(short sqlaID short index, Boolean input, Boolean withNull);
}
class dITime : public ITime
{ char theTime[15];
public:
setDate();
setV(short sqlaID short index, Boolean input, Boolean withNull);
}