home *** CD-ROM | disk | FTP | other *** search
- #if !defined(BTI_DOS) && !defined(BTI_WIN) && \
- !defined(BTI_NLM) && !defined(BTI_DOS_32R) && !defined(BTI_DOS_32P) && \
- !defined(BTI_DOS_32B) && !defined(BTI_DOS_16B) &&\
- !defined(BTI_WIN_32)
- #error Define one of the following: BTI_DOS, BTI_WIN, BTI_NLM, \
- BTI_DOS_32R, BTI_DOS_32P, BTI_DOS_32B, BTI_DOS_16B, BTI_WIN_32
- #endif
- #ifndef _SQLAPI_H_INCLUDED
- /***************************************************************************
- **
- ** Copyright (c) 1982-1998 Pervasive Software Inc. All Rights Reserved.
- **
- ***************************************************************************/
- /***************************************************************************
- SQLAPI.H
- This file contains prototypes for the DOS, MS Windows, and
- NLM Scalable SQL calls. The calling application may be C or C++.
-
- Except for DOS and Extended DOS, the Scalable SQL application
- developer will also need either an import library or linker import
- statements to identify the imported Scalable SQL functions to the
- linker. The imported functions are:
-
- MS-Windows ... All SQL functions
- NLM .......... XQLEntry - All functions accessed through
- XQLEntry except the Named Database
- APIs.
-
- Import library names are:
-
- MS-Windows ... W1SQLV7.LIB,
- W1DBNV7.LIB ( if Named Database APIs used )
- MS-Win 32 ... W3SQLV7.LIB,
- W3DBNV7.LIB ( if Named Database APIs used )
- NLM .......... Use the linker import statement to import
- XQLEntry.
-
- If you are creating a DOS, Extended DOS, or NLM application, you must
- compile 'sqlapi.c' and link the resulting object module with your
- application.
-
- This interface module does not support 32-bit Windows applications.
- If you are developing a 32-bit Windows application, you must write
- your own routines to call the necessary compiler-specific functions
- before and after calling a function in the SQL 16-bit DLL.
-
- You must define one of the following to your compiler in order to
- compile for a particular platform:
-
- BTI_DOS - DOS 16-bit Apps
- BTI_DOS_32R - Extended DOS /w Rational + SSQLSTUB.EXE 32-bit Apps
- BTI_DOS_32P - Extended DOS /w Phar Lap 6.0 32-bit Apps
- BTI_DOS_32B - Extended DOS /w Borland PowerPack 32-bit Apps
- BTI_DOS_16B - Extended DOS /w Borland Powerpack 16-bit Apps
- BTI_WIN - MS WINDOWS 16-bit Apps
- BTI_WIN_32 - Win32s, NT, Win95 32-bit Apps
- BTI_NLM - NetWare NLM 32-bit Apps
-
- If you do not specify one of the above switches to your compiler,
- an error directive in these interface modules will halt the compilation.
-
- Current support for Named Database APIs:
-
- DOS MS Windows
- --- ----------
- SQLGetCountDatabaseNames SQLGetCountDatabaseNames
- SQLGetDatabaseNames SQLGetDatabaseNames
- SQLUnloadDBNames SQLUnloadDBNames
- SQLGetCountRemoteDatabaseNames
- SQLGetRemoteDatabaseNames
-
- For 32-Bit DOS Rational Applications Using SSQLSTUB
- ---------------------------------------------------
- If you are using the Rational Systems DOS Extender, DOS4G.EXE, along
- with SSQLSTUB.EXE, you will need to define the plaform switch,
- BTI_DOS_32R to your compiler. You also must link your application
- using the Rational linker, GLU.EXE. You MUST have a '.def' file
- similar to the following which is used to create a 32-bit sqlsamp.exe:
-
- sqlsamp.def
- -----------
- LIBRARY sqlsamp.dll
- DATA NONSHARED
- EXPORTS
- __ImportedFunctions_
-
- The module, sqlapi.c, requires '__ImportedFunctions_' as shown in
- the above sqlsamp.def. This allows sqlapi.c to call a function
- in Btrieve without using int386.
-
- The following is the GLU '.lnk' file for sqlsamp.exe using WATCOM
- libraries:
-
- sqlsamp.lnk
- -----------
- sqlsamp.obj
- sqlapi.obj
- -format lin -stack 40000 -dbg -stub ssqlstub.exe
- e(sqlsamp)
- m(sqlsamp)
- dos32wc.lib
- clib3r.lib
- math3r.lib
- math387r.lib
- emu387.lib
-
- You invoke GLU.EXE as follows:
-
- glu -deffile sqlsamp.def @$(target_dir)\sqlsamp.lnk
-
-
- For 32-Bit DOS Borland PowerPack and Phar Lap 6.0 Applications
- --------------------------------------------------------------
- You must compile and link the following modules:
- - sqlapi.obj
- - fixparms.obj
- - vglobals.obj
- - cnvseq.obj
- - bmemcopy.obj ( already assembled )
-
- For 32-Bit NT, Win95, and Win32s Applications
- ---------------------------------------------
- - If using WATCOM, you must use version 10.5 or later. Earlier versions
- do not understand the format of the import libraries.
-
- 'BTI_SIZE' Notes
- ----------------
- The purpose of the BTI_SIZE data type is to allow the size of the data
- buffer for the SSQL engine to change as platforms change without
- affecting the application's data types. We have changed all count,
- length, and size parameters in the SSQL APIs to be of type 'BTI_SIZE'.
-
- ***************************************************************************/
- #include <btitypes.h>
- #include <stddef.h>
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- /**************************************************************************
- PLATFORM-INDEPENDENT SESSION MANAGEMENT PRIMITIVES
- The following primitives are required by applications which
- want to use multiple SQL logins:
- xGetSessionID
- xPutSessionID
- **************************************************************************/
- BTI_API xGetSessionID(
- BTI_SINT_PTR iSessionID );
-
- BTI_API xPutSessionID(
- BTI_SINT iSessionID );
-
- /**************************************************************************
- PLATFORM-SPECIFIC MISCELLANEOUS FUNCTIONS
- XQLCallback ( MS Windows )
- xShareSessionID ( MS Windows )
- SetNSAgentID ( NLM )
- SQLGetCountDatabaseNames ( MS Windows, NT, Win95, DOS )
- SQLGetCountRemoteDatabaseNames ( MS Windows, NT, Win95 )
- SQLGetDatabaseNames ( MS Windows, NT, Win95, DOS )
- SQLGetRemoteDatabaseNames ( MS Windows, NT, Win95 )
- SQLUnloadDBNames ( MS Windows, NT, Win95, DOS )
- **************************************************************************/
- #ifdef BTI_WIN
- BTI_API XQLCallback(
- BTI_WORD iAction,
- BTI_WORD iOption,
- BTI_CB_FUNC_PTR_T fCallback,
- BTI_CB_FUNC_PTR_T BTI_FAR *fPrevCallback,
- BTI_VOID_PTR bUData,
- BTI_VOID_PTR BTI_FAR *bPrevUData );
-
- BTI_API xShareSessionID(
- BTI_SIZE_PTR tChangeCount );
- #endif
-
- #ifdef BTI_NLM
- BTI_VOID SetNSAgentID(
- BTI_CHAR_PTR newID );
- #endif
-
- #if defined( BTI_WIN ) || defined( BTI_WIN_32 )
- /* DATABASE NAMES APIs FOR WINDOWS */
- BTI_API SQLGetCountDatabaseNames(
- BTI_SIZE_PTR tCount );
-
- BTI_API SQLGetCountRemoteDatabaseNames(
- BTI_SIZE_PTR tCount );
-
- BTI_API SQLGetDatabaseNames(
- BTI_SIZE_PTR tBufLen,
- BTI_CHAR_PTR bDataBuf );
-
- BTI_API SQLGetRemoteDatabaseNames(
- BTI_SIZE_PTR tBufLen,
- BTI_CHAR_PTR bDataBuf );
-
- BTI_API SQLUnloadDBNames(
- BTI_INT iReserved );
- #endif
-
- #if defined(BTI_DOS) || defined(BTI_DOS_32R) || \
- defined(BTI_DOS_32P) || defined(BTI_DOS_32B) || \
- defined(BTI_DOS_16B)
- /* DATABASE NAMES APIs FOR DOS */
- BTI_API SQLGetCountDatabaseNames(
- BTI_SIZE_PTR tCount );
-
- BTI_API SQLGetDatabaseNames(
- BTI_SIZE_PTR tBufLen,
- BTI_CHAR_PTR bDataBuf );
-
- BTI_API SQLUnloadDBNames(
- BTI_SINT iReserved );
- #endif
-
- /**************************************************************************
- PLATFORM-INDEPENDENT SQL-LEVEL FUNCTIONS
- XQLCursor XQLSPUtility
- XQLCompile XQLStatus
- XQLDescribe XQLStop
- XQLExec XQLSubst
- XQLFetch XQLVersion
- XQLFormat XQLConvert
- XQLFree XQLValidate
- XQLLogin XQLMask
- XQLLogout
- **************************************************************************/
- BTI_API XQLCursor(
- BTI_SINT_PTR iCursorID );
-
- BTI_API XQLCompile(
- BTI_SINT iCursorID,
- BTI_SIZE_PTR tStatementLen,
- BTI_CHAR_PTR sStatement );
-
- BTI_API XQLDescribe(
- BTI_SINT iCursorID,
- BTI_SIZE tPosition,
- BTI_SINT_PTR iDataType,
- BTI_SIZE_PTR tSize,
- BTI_SIZE_PTR tDecPlaces,
- BTI_SIZE_PTR tDisplayLen,
- BTI_SIZE_PTR tNameLen,
- BTI_CHAR_PTR sName );
-
- BTI_API XQLExec(
- BTI_SINT iCursorID );
-
- BTI_API XQLFetch(
- BTI_SINT iCursorID,
- BTI_SINT iOption,
- BTI_SIZE_PTR tBufLen,
- BTI_CHAR_PTR bDataBuf,
- BTI_LONG_PTR lCount,
- BTI_SINT iASCIIFlag,
- BTI_SINT iSpacing );
-
- BTI_API XQLFormat(
- BTI_SINT iCursorID,
- BTI_SIZE tPosition,
- BTI_SIZE tMaskLen,
- BTI_CHAR_PTR sMask );
-
- BTI_API XQLFree(
- BTI_SINT iCursorID );
-
- BTI_API XQLLogin(
- BTI_CHAR_PTR sUser,
- BTI_CHAR_PTR sPassword,
- BTI_CHAR_PTR sDDPath,
- BTI_CHAR_PTR sDataPath,
- BTI_CHAR_PTR sReserved,
- BTI_SINT iFeaturesUsed );
-
- BTI_API XQLLogout(
- void );
-
- BTI_API XQLSPUtility(
- BTI_SINT iCursorID,
- BTI_SINT iOption,
- BTI_SIZE_PTR tStatementCount,
- BTI_SIZE_PTR tStatementExec,
- BTI_SIZE_PTR tBufLen,
- BTI_CHAR_PTR bDataBuf );
-
- BTI_API XQLStatus(
- BTI_SINT iCursorID,
- BTI_SINT iOption,
- BTI_CHAR_PTR sStatBuf );
-
- BTI_API XQLStop(
- void );
-
- BTI_API XQLSubst(
- BTI_SINT iCursorID,
- BTI_SIZE tCount,
- BTI_SIZE tNameLen,
- BTI_CHAR_PTR sVarNames,
- BTI_SIZE tTextLen,
- BTI_CHAR_PTR sValueText );
-
- BTI_API XQLVersion(
- BTI_CHAR_PTR sVersion );
-
- BTI_API XQLConvert(
- BTI_SINT iOption,
- BTI_SINT iType,
- BTI_SIZE tSize,
- BTI_SIZE tDec,
- BTI_SIZE tdSize,
- BTI_CHAR_PTR sValue,
- BTI_CHAR_PTR sRetVal,
- BTI_CHAR_PTR sMask,
- BTI_SINT sJustify );
-
- BTI_API XQLValidate(
- BTI_SIZE_PTR tCount,
- BTI_CHAR_PTR sFieldName,
- BTI_SIZE tBufLen,
- BTI_CHAR_PTR bDataBuf );
-
- BTI_API XQLMask(
- BTI_SINT iOption,
- BTI_SINT iType,
- BTI_SIZE tSize,
- BTI_SIZE tDec,
- BTI_SIZE_PTR tLen,
- BTI_CHAR_PTR sMask );
-
- /**************************************************************************
- PLATFORM-INDEPENDENT HISTORICAL RELATIONAL PRIMITIVES
- The following functions will be phased out over time. They
- are included in the interface modules to support existing
- applications. New applications should not use these functions.
-
- xCompute xOrder xDD xAccess
- xDescribe xRemall xDDAttr xPassword
- xMovefld xRemove xDDModify xSecurity
- xFetch xReset xDDCreate xUser
- xField xRestrict xDDDrop xChar
- xFree xStop xDDField xVersion
- xInsert xTrans xDDFile xStatus
- xJoin xStore xDDIndex xConvert
- xLogin xRecall xDDPath xValidate
- xLogout xUpdate xDDView xMask
- xNew xUpdall
- *********************************************************************/
- BTI_API xCompute(
- BTI_SINT iCursorID,
- BTI_CHAR_PTR sFldName,
- BTI_SINT iFldType,
- BTI_SIZE tFldLen,
- BTI_SIZE tDecPlaces,
- BTI_SIZE_PTR tExpLen,
- BTI_CHAR_PTR sExpression );
-
- BTI_API xDescribe(
- BTI_SINT iCursorID,
- BTI_SINT iOption,
- BTI_SIZE_PTR tBufLen,
- BTI_SIZE tPosition,
- BTI_SIZE_PTR tCount,
- BTI_CHAR_PTR bDataBuf );
-
- BTI_API xMovefld(
- BTI_SINT iCursorID,
- BTI_SIZE tFromPosition,
- BTI_SIZE tToPosition );
-
- BTI_API xFetch(
- BTI_SINT iCursorID,
- BTI_SIZE_PTR tBufLen,
- BTI_SINT iOption,
- BTI_LONG_PTR lRecordCount,
- BTI_LONG_PTR lRejectCount,
- BTI_CHAR_PTR bDataBuf );
-
- BTI_API xField(
- BTI_SINT iCursorID,
- BTI_SINT iOption,
- BTI_SIZE tPosition,
- BTI_SIZE_PTR tCount,
- BTI_CHAR_PTR sFldNames );
-
- BTI_API xFree(
- BTI_SINT iCursorID );
-
- BTI_API xInsert(
- BTI_SINT iCursorID,
- BTI_SIZE_PTR tFileCount,
- BTI_CHAR_PTR sFileNames,
- BTI_LONG_PTR lRecordCount,
- BTI_CHAR_PTR bDataBuf );
-
- BTI_API xJoin(
- BTI_SINT iCursorID,
- BTI_CHAR_PTR sSecFile,
- BTI_CHAR_PTR sOwner,
- BTI_SINT iOption,
- BTI_SIZE tPriFldCount,
- BTI_CHAR_PTR sPriFlds,
- BTI_SIZE tSecFldCount,
- BTI_CHAR_PTR sSecFlds );
-
- BTI_API xLogin(
- BTI_CHAR_PTR sUser,
- BTI_CHAR_PTR sPassword,
- BTI_CHAR_PTR sDDPath,
- BTI_CHAR_PTR sDataPath,
- BTI_CHAR_PTR sReserved,
- BTI_SINT iFeaturesUsed );
-
- BTI_API xLogout(
- void );
-
- BTI_API xNew(
- BTI_SINT_PTR iCursorID,
- BTI_CHAR_PTR sFileName,
- BTI_CHAR_PTR sOwner,
- BTI_SINT iOpenMode );
-
- BTI_API xOrder(
- BTI_SINT iCursorID,
- BTI_SIZE tCount,
- BTI_CHAR_PTR sOrderFld );
-
- BTI_API xRemall(
- BTI_SINT iCursorID,
- BTI_SIZE_PTR tFileCount,
- BTI_CHAR_PTR sFileNames,
- BTI_SINT iOption,
- BTI_LONG_PTR lRecordCount,
- BTI_LONG_PTR lRejectCount );
-
- BTI_API xRemove(
- BTI_SINT iCursorID,
- BTI_SIZE_PTR tFileCount,
- BTI_CHAR_PTR sFileNames,
- BTI_LONG_PTR lRecordCount );
-
- BTI_API xReset(
- BTI_CHAR_PTR sReserved );
-
- BTI_API xRestrict(
- BTI_SINT iCursorID,
- BTI_SINT iOption,
- BTI_SIZE_PTR tExpLen,
- BTI_CHAR_PTR sExpression );
-
- BTI_API xStop(
- void );
-
- BTI_API xTrans(
- BTI_SINT iOption );
-
- BTI_API xStore(
- BTI_SINT iCursorID,
- BTI_CHAR_PTR sViewName,
- BTI_SIZE tTextLen,
- BTI_CHAR_PTR sText );
-
- BTI_API xRecall(
- BTI_SINT_PTR iCursorID,
- BTI_CHAR_PTR sViewName,
- BTI_SIZE tOwnerCount,
- BTI_CHAR_PTR sOwner,
- BTI_SINT iOpenMode,
- BTI_SIZE_PTR tTextLen,
- BTI_CHAR_PTR sText );
-
- BTI_API xUpdate(
- BTI_SINT iCursorID,
- BTI_SIZE_PTR tFileCount,
- BTI_CHAR_PTR sFileNames,
- BTI_LONG_PTR lRecordCount,
- BTI_CHAR_PTR bDataBuf );
-
- BTI_API xUpdall(
- BTI_SINT iCursorID,
- BTI_SIZE_PTR tFileCount,
- BTI_CHAR_PTR sFileNames,
- BTI_SINT iOption,
- BTI_LONG_PTR lRecordCount,
- BTI_LONG_PTR lRejectCount,
- BTI_SIZE tFldCount,
- BTI_CHAR_PTR sUpdateFld,
- BTI_CHAR_PTR sReplaceFld );
-
- BTI_API xDD(
- BTI_CHAR_PTR sPathName,
- BTI_SINT iOption );
-
- BTI_API xDDAttr(
- BTI_SINT iOption,
- BTI_CHAR_PTR sFldName,
- BTI_SINT iAttrType,
- BTI_SIZE_PTR tBufLen,
- BTI_CHAR_PTR sAttrBuf );
-
- BTI_API xDDModify(
- BTI_SINT iOption,
- BTI_CHAR_PTR sFileName,
- BTI_SINT iCreate,
- BTI_CHAR_PTR sPathName,
- BTI_CHAR_PTR sOwner,
- BTI_SINT iOwnerFlag,
- BTI_SIZE tFldCount,
- BTI_CHAR_PTR bFldBuf,
- BTI_SIZE tIndxCount,
- BTI_CHAR_PTR bIndxBuf );
-
- BTI_API xDDCreate(
- BTI_SINT iOption,
- BTI_CHAR_PTR sFileName,
- BTI_SINT iCreate,
- BTI_CHAR_PTR sPathName,
- BTI_CHAR_PTR sOwner,
- BTI_SINT iOwnerFlag,
- BTI_SIZE tFldCount,
- BTI_CHAR_PTR bFldBuf,
- BTI_SIZE tIndxCount,
- BTI_CHAR_PTR bIndxBuf,
- BTI_SIZE tBufLen,
- BTI_CHAR_PTR bCreateParmsBuf );
-
- BTI_API xDDDrop(
- BTI_CHAR_PTR sName,
- BTI_SINT iType,
- BTI_SINT iDelete );
-
- BTI_API xDDField(
- BTI_SINT iOption,
- BTI_SIZE_PTR tCount,
- BTI_CHAR_PTR sFldNames,
- BTI_SIZE_PTR tBufLen,
- BTI_CHAR_PTR bDataBuf );
-
- BTI_API xDDFile(
- BTI_SINT iOption,
- BTI_SIZE_PTR tCount,
- BTI_CHAR_PTR sFileNames,
- BTI_SIZE_PTR tBufLen,
- BTI_CHAR_PTR bDataBuf );
-
- BTI_API xDDIndex(
- BTI_SINT iOption,
- BTI_SIZE_PTR tCount,
- BTI_CHAR_PTR sIndexName,
- BTI_SIZE_PTR tBufLen,
- BTI_CHAR_PTR bDataBuf );
-
- BTI_API xDDPath(
- BTI_SINT iOption,
- BTI_CHAR_PTR sPathName );
-
- BTI_API xDDView(
- BTI_SIZE_PTR tCount,
- BTI_CHAR_PTR sViewName,
- BTI_SIZE_PTR tBufLen,
- BTI_CHAR_PTR bDataBuf );
-
- BTI_API xAccess(
- BTI_CHAR_PTR sMstrPswd,
- BTI_CHAR_PTR sUser,
- BTI_SINT iOption,
- BTI_SINT iAccRights,
- BTI_CHAR_PTR sFileName,
- BTI_SIZE_PTR tCount,
- BTI_CHAR_PTR sFldNames,
- BTI_SIZE_PTR tBufLen,
- BTI_CHAR_PTR bDataBuf );
-
- BTI_API xPassword(
- BTI_CHAR_PTR sUser,
- BTI_CHAR_PTR sPassword );
-
- BTI_API xSecurity(
- BTI_CHAR_PTR sMstrPswd,
- BTI_SINT iOption );
-
- BTI_API xUser(
- BTI_CHAR_PTR sMstPswd,
- BTI_SINT iOption,
- BTI_CHAR_PTR sUser,
- BTI_CHAR_PTR sPassword,
- BTI_SINT iFlags,
- BTI_SIZE_PTR tCount,
- BTI_SIZE_PTR tBufLen,
- BTI_CHAR_PTR bDataBuf );
-
- BTI_API xChar(
- BTI_SINT iOption,
- BTI_SINT iType,
- BTI_CHAR_PTR cCharacter );
-
- BTI_API xVersion(
- BTI_CHAR_PTR sVersion );
-
- BTI_API xStatus(
- BTI_SINT iCursorID,
- BTI_SINT iOption,
- BTI_SIZE_PTR tLen,
- BTI_CHAR_PTR sStatBuf );
-
- BTI_API xConvert(
- BTI_SINT iOption,
- BTI_SINT iType,
- BTI_SIZE tSize,
- BTI_SIZE tDec,
- BTI_SIZE tDSize,
- BTI_CHAR_PTR sValue,
- BTI_CHAR_PTR sRetVal,
- BTI_CHAR_PTR sMask,
- BTI_SINT iJustify );
-
- BTI_API xValidate(
- BTI_SIZE_PTR tCount,
- BTI_CHAR_PTR sFieldName,
- BTI_SIZE tBufLen,
- BTI_CHAR_PTR bDataBuf );
-
- BTI_API xMask(
- BTI_SINT iOption,
- BTI_SINT iType,
- BTI_SIZE tSize,
- BTI_SINT iDec,
- BTI_SIZE_PTR tLen,
- BTI_CHAR_PTR sMask );
-
- /***************************************************************************
- Structure Definitions
- ***************************************************************************/
- #define XQLP_SIG 0x504c5158 /* "XQLP" */
- #define XQLM_SIG 0x4d4c5158 /* "XQLM" */
-
- /***************************************************************************
- Named Database Constants and Structure Definitions
- The following section is needed for both sqlapi.c and sqlapix.c.
- Sqlapix.c is available only to internal BTI users.
- ***************************************************************************/
- #if defined(BTI_DOS) || defined(BTI_DOS_32R) || \
- defined(BTI_DOS_32P) || defined(BTI_DOS_32B) || \
- defined(BTI_DOS_16B)
-
- #define DBNM_SIG 0x4d4e4244L /* "DBNM" */
- #define DBNM_FUNC 768
- #define PMSW_SIGN "PMSW"
-
- /* SQLAddDataBaseName Fcn: 0 */
- typedef struct
- {
- BTI_CHAR_PTR databaseName;
- BTI_CHAR_PTR databaseFlags;
- BTI_ULONG dictionaryBufLen;
- BTI_CHAR_PTR dictionaryPath;
- BTI_ULONG dataPathBufLen;
- BTI_CHAR_PTR dataPaths;
- } DBNADD;
-
- /* SQLDropDatabaseName Fcn: 1 */
- typedef struct
- {
- BTI_CHAR_PTR databaseName;
- } DBNDROP;
-
- /* SQLGetCountDatabaseNames Fcn: 2 */
- typedef struct
- {
- BTI_ULONG count;
- } DBNGETCNT;
-
- /* SQLGetDatabaseInfo Fcn: 3 */
- typedef struct
- {
- BTI_CHAR_PTR databaseName;
- BTI_CHAR_PTR databaseFlags;
- BTI_ULONG dictionaryBufLen;
- BTI_CHAR_PTR dictionaryPath;
- BTI_ULONG dataPathBufLen;
- BTI_CHAR_PTR dataPaths;
- } DBNGETINFO;
-
- /* SQLGetDatabaseNames Fcn: 4 */
- typedef struct
- {
- BTI_ULONG bufLen;
- BTI_CHAR_PTR buffer;
- } DBNGETNAME;
-
- /* SQLModifyDatabaseInfo Fcn: 5 */
- typedef struct
- {
- BTI_CHAR_PTR databaseName;
- BTI_CHAR_PTR databaseFlags;
- BTI_ULONG dictionaryBufLen;
- BTI_CHAR_PTR dictionaryPath;
- BTI_ULONG dataPathBufLen;
- BTI_CHAR_PTR dataPaths;
- } DBNMODINFO;
-
- /* SQLRenameDatabase Fcn: 6 */
- typedef struct
- {
- BTI_CHAR_PTR oldDatabaseName;
- BTI_CHAR_PTR newDatabaseName;
- } DBNREN;
-
- /* SQLUnloadDBNames Fcn: 7 */
- typedef struct
- {
- BTI_SINT reserved;
- } DBNUNLOAD;
-
- /* Protected Mode switch parameter block */
- typedef struct
- {
- BTI_CHAR sign[ 4 ];
- BTI_ULONG flags;
- BTI_ULONG func;
- BTI_LONG stat;
- BTI_ULONG len;
- BTI_VOID_PTR data;
- } pmswParmBlock;
- #endif
-
-
- /***************************************************************************
- Structure Definitions for Primitives
- ***************************************************************************/
- /* xAccess */
- typedef struct
- {
- BTI_CHAR_PTR mpswd;
- BTI_CHAR_PTR username;
- BTI_SINT fcn; /* allow, deny, return rights */
- BTI_SINT rights;
- BTI_CHAR_PTR filename;
- BTI_SINT count; /* field list count */
- BTI_CHAR_PTR name; /* field list names */
- BTI_SINT buflen; /* max buffer length */
- BTI_CHAR_PTR outbuf; /* output buffer */
- } TACCESS;
-
-
- /* xChar */
- typedef struct
- {
- BTI_SINT charFcn;
- BTI_SINT charType;
- BTI_SINT charValue;
- } TCHARX;
-
-
- /* xCompute */
- typedef struct
- {
- BTI_CHAR_PTR fldname;
- BTI_SINT fldtype;
- BTI_SINT fldsize;
- BTI_SINT flddec;
- BTI_SINT explen;
- BTI_CHAR_PTR expbuf;
- } TCOMPUTE;
-
-
- /* xConvert */
- typedef struct
- {
- BTI_SINT option;
- BTI_SINT type;
- BTI_SINT size;
- BTI_SINT dec;
- BTI_SINT dsize;
- BTI_CHAR_PTR value;
- BTI_CHAR_PTR retval;
- BTI_CHAR_PTR mask;
- BTI_SINT justify;
- } TCONVERT;
-
-
- /* xDD */
- typedef struct
- {
- BTI_CHAR_PTR dirpath;
- BTI_SINT function;
- } TDD;
-
-
- /* xDDAttr */
- typedef struct
- {
- BTI_SINT fcn;
- BTI_CHAR_PTR fieldname; /* field name */
- BTI_SINT attr;
- BTI_SINT bufsize;
- BTI_CHAR_PTR attrbuf; /* attributes buffer */
- } TDDATTR;
-
-
- /* xDDCreate */
- typedef struct
- {
- BTI_SINT option;
- BTI_CHAR_PTR filename;
- BTI_SINT create;
- BTI_CHAR_PTR pathname;
- BTI_CHAR_PTR owner;
- BTI_SINT oaccess; /* owner access restrictions */
- BTI_SINT fldcount;
- BTI_CHAR_PTR fieldlist;
- BTI_SINT kcount;
- BTI_CHAR_PTR keylist;
- BTI_SINT buflen;
- BTI_CHAR_PTR createparms;
- } TDDCREATE;
-
-
- /* xDDDrop */
- typedef struct
- {
- BTI_CHAR_PTR filename;
- BTI_SINT filetype;
- BTI_SINT deletepath;
- } TDDDROP;
-
-
- /* xDDField */
- typedef struct
- {
- BTI_SINT rtype;
- BTI_SINT count;
- BTI_CHAR_PTR fieldbuf;
- BTI_SINT buflen;
- BTI_CHAR_PTR outbuf;
- } TDDFIELD;
-
-
- /* xDDFile */
- typedef struct
- {
- BTI_SINT rtype;
- BTI_SINT count;
- BTI_CHAR_PTR filebuf;
- BTI_SINT buflen;
- BTI_CHAR_PTR outbuf;
- } TDDFILE;
-
-
- /* xDDIndex */
- typedef struct
- {
- BTI_SINT rtype;
- BTI_SINT count;
- BTI_CHAR_PTR fieldbuf;
- BTI_SINT buflen;
- BTI_CHAR_PTR outbuf;
- } TDDINDEX;
-
-
- /* xDDModify */
- typedef struct
- {
- BTI_SINT option;
- BTI_CHAR_PTR filename;
- BTI_SINT create;
- BTI_CHAR_PTR pathname;
- BTI_CHAR_PTR owner;
- BTI_SINT oaccess; /* owner access restrictions */
- BTI_SINT fldcount;
- BTI_CHAR_PTR fieldlist;
- BTI_SINT kcount;
- BTI_CHAR_PTR keylist;
- } TDDMOD;
-
-
- /* xDDPath */
- typedef struct
- {
- BTI_SINT dirtype;
- BTI_CHAR_PTR pathname;
- } TDDPATH;
-
-
- /* xDDView */
- typedef struct
- {
- BTI_SINT count;
- BTI_CHAR_PTR viewname;
- BTI_SINT buflen;
- BTI_CHAR_PTR outbuf;
- } TDDVIEW;
-
-
- /* xDescribe */
- typedef struct
- {
- BTI_SINT option;
- BTI_SINT desclen;
- BTI_SINT position;
- BTI_SINT count;
- BTI_CHAR_PTR desclist;
- } TDESCRIBE;
-
-
- /* xFetch */
- typedef struct
- {
- BTI_SINT datalen;
- BTI_SINT option;
- long select;
- long reject;
- BTI_CHAR_PTR databuf;
- } TFETCH;
-
-
- /* xField */
- typedef struct
- {
- BTI_SINT option;
- BTI_SINT position;
- BTI_SINT count;
- BTI_CHAR_PTR fldlist;
- } TFIELD;
-
-
- /* xInsert */
- /* xUpdate */
- /* xRemove */
- typedef struct
- {
- BTI_SINT filecount;
- BTI_CHAR_PTR filelist;
- long editcount;
- BTI_CHAR_PTR buf;
- } TEDIT;
-
-
- /* xJoin */
- typedef struct
- {
- BTI_CHAR_PTR filename;
- BTI_CHAR_PTR owner;
- BTI_SINT joinType;
- BTI_SINT pCount;
- BTI_CHAR_PTR pNames;
- BTI_SINT sCount;
- BTI_CHAR_PTR sNames;
- } TJOIN;
-
-
- /* xLogin */
- typedef struct
- {
- BTI_CHAR_PTR username;
- BTI_CHAR_PTR pswd;
- BTI_CHAR_PTR dictionary;
- BTI_CHAR_PTR filepath;
- BTI_CHAR_PTR sreserved;
- BTI_SINT iFeaturesUsed;
- } TLOGIN;
-
-
- /* xMask */
- typedef struct
- {
- BTI_SINT option;
- BTI_SINT type;
- BTI_SINT size;
- BTI_SINT dec;
- BTI_SINT mlen;
- BTI_CHAR_PTR mask;
- } TMASK;
-
-
- /* xMovefld */
- typedef struct
- {
- BTI_SINT frompos;
- BTI_SINT topos;
- } TMOVEFLD;
-
-
- /* xNew */
- typedef struct
- {
- BTI_CHAR_PTR filename;
- BTI_CHAR_PTR owner;
- BTI_SINT openmode;
- } TNEW;
-
-
- /* xOrder */
- typedef struct
- {
- BTI_SINT count;
- BTI_CHAR_PTR fldlist;
- } TORDER;
-
-
- /* xPassword */
- typedef struct
- {
- BTI_CHAR_PTR user; /* user name */
- BTI_CHAR_PTR pswd; /* password */
- } TPASSWORD;
-
-
- /* xRecall */
- typedef struct
- {
- BTI_CHAR_PTR RecallName;
- BTI_SINT ownernum;
- BTI_CHAR_PTR ownerlst;
- BTI_SINT openmode;
- BTI_SINT buflen;
- BTI_CHAR_PTR buf;
- } TRECALL;
-
-
- /* xRemall */
- typedef struct
- {
- BTI_SINT filecount;
- BTI_CHAR_PTR filelist;
- BTI_SINT option;
- long select;
- long reject;
- } TREMALL;
-
-
- /* xReset */
- typedef struct
- {
- BTI_CHAR_PTR sreserved;
- } TRESET;
-
-
- /* xRestrict */
- typedef struct
- {
- BTI_SINT option; /* new | extended restriction */
- BTI_SINT explen;
- BTI_CHAR_PTR expbuf;
- } TRESTRICT;
-
-
- /* xSecurity */
- typedef struct
-
- {
- /* master password */
- BTI_CHAR_PTR mpswd;
- BTI_SINT securityflag;
- } TSECURE;
-
-
- /* xStatus */
- typedef struct
- {
- BTI_SINT option;
- BTI_SINT buflen;
- BTI_CHAR_PTR buf;
- } TSTATUS;
-
-
- /* xStore */
- typedef struct
- {
- BTI_CHAR_PTR StoreName;
- BTI_SINT BufLen;
- BTI_CHAR_PTR Buf;
- } TSTORE;
-
-
- /* xTrans */
- typedef struct
- {
- BTI_SINT option;
- } TTRANS;
-
-
- /* xUpdall */
- typedef struct
- {
- BTI_SINT filecount;
- BTI_CHAR_PTR filelist;
- BTI_SINT option;
- long select;
- long reject;
- BTI_SINT count;
- BTI_CHAR_PTR result;
- BTI_CHAR_PTR value;
- } TUPDALL;
-
-
- /* xUser */
- typedef struct
- {
- BTI_CHAR_PTR mpswd;
- BTI_SINT fcn; /* add, modify, remove */
- BTI_CHAR_PTR username;
- BTI_CHAR_PTR pswd;
- BTI_SINT grights; /* global rights */
- BTI_SINT count;
- BTI_SINT buflen;
- BTI_CHAR_PTR userbuf;
- } TUSER;
-
-
- /* xValidate */
- typedef struct
- {
- BTI_SINT count;
- BTI_CHAR_PTR fieldname;
- BTI_SINT buflen;
- BTI_CHAR_PTR data;
- } TVALIDATE;
-
-
- /* xVersion */
- typedef struct
- {
- BTI_CHAR_PTR buffer;
- } TVERSION;
-
- typedef struct
- {
- BTI_SINT dumy1;
- BTI_SINT btrop; /* Btrieve operation code */
- BTI_SINT dumy2;
- BTI_SINT dumy3;
- BTI_SINT dumy4;
- BTI_CHAR_PTR btrstat;
- } BBTRIEVE;
-
- /***************************************************************************
- Structure Definitions for Management-Level APIs
- ***************************************************************************/
- /* XQLCompile */
- typedef struct
- {
- BTI_SINT length;
- BTI_CHAR_PTR statement;
- } XCOMPILE;
-
-
- /* XQLConvert */
- typedef struct
- {
- BTI_SINT option;
- BTI_SINT type;
- BTI_SINT size;
- BTI_SINT dec;
- BTI_SINT dsize;
- BTI_CHAR_PTR value;
- BTI_CHAR_PTR retval;
- BTI_CHAR_PTR mask;
- BTI_SINT justify;
- } XCONVERT;
-
-
- /* XQLDescribe*/
- typedef struct
- {
- BTI_SINT position;
- BTI_SINT datatype;
- BTI_SINT datasize;
- BTI_SINT deccount;
- BTI_SINT dsize; /* display size */
- BTI_SINT namelength;
- BTI_CHAR_PTR namebuf;
- } XDESCRIBE;
-
-
- /* XQLFetch */
- typedef struct
- {
- BTI_SINT operation;
- BTI_SINT datalen;
- BTI_CHAR_PTR databuf;
- long select;
- BTI_SINT ASCIIFlag;
- BTI_SINT spacing;
- } XFETCH;
-
-
- /* XQLFormat */
- typedef struct
- {
- BTI_SINT position;
- BTI_SINT masklen;
- BTI_CHAR_PTR mask;
- } XFORMAT;
-
-
- /* XQLLogin */
- typedef struct
- {
- BTI_CHAR_PTR username;
- BTI_CHAR_PTR pswd;
- BTI_CHAR_PTR dictionary;
- BTI_CHAR_PTR filepath;
- BTI_CHAR_PTR sreserved;
- BTI_SINT iFeaturesUsed;
- } XLOGIN;
-
-
- /* XQLMask */
- typedef struct
- {
- BTI_SINT option;
- BTI_SINT type;
- BTI_SINT size;
- BTI_SINT dec;
- BTI_SINT mlen;
- BTI_CHAR_PTR mask;
- } XMASK;
-
-
- /* XQLSPUtility */
- typedef struct
- {
- BTI_SINT option;
- BTI_SINT stmntCnt;
- BTI_SINT stmntExec;
- BTI_SINT bufLen;
- BTI_CHAR_PTR statBuf;
- } XSPUTILITY;
-
-
- /* XQLStatus */
- typedef struct
- {
- BTI_SINT option;
- BTI_CHAR_PTR buf;
- } XSTATUS;
-
-
- /* XQLSubstitute*/
- typedef struct
- {
- BTI_SINT count;
- BTI_SINT nlen;
- BTI_CHAR_PTR vname; /* variable name */
- BTI_SINT tlen;
- BTI_CHAR_PTR vtext; /* variable text */
- } XSUBST;
-
-
- /* XQLValidate */
- typedef struct
- {
- BTI_SINT count;
- BTI_CHAR_PTR fieldname;
- BTI_SINT buflen;
- BTI_CHAR_PTR data;
- } XVALID;
-
-
- /* XQLVersion */
- typedef struct
- {
- BTI_CHAR_PTR buffer;
- } XVERSION;
-
-
- /* parameter block for XQLP (primitives) and XQLM (management-level) */
- typedef struct
- {
- BTI_BYTE XQL_ID[4];
- BTI_WORD fcn;
- BTI_WORD cursorid;
- BTI_SINT stat;
- BTI_SINT sessionid;
- union
- {
- TACCESS taccessData;
- TCHARX tcharData;
- TCOMPUTE tcompData;
- TCONVERT tcnvData;
- TDD tddData;
- TDDATTR tddattrData;
- TDDCREATE tcreData;
- TDDDROP tdddropData;
- TDDFIELD tddfieldData;
- TDDFILE tddfileData;
- TDDINDEX tddindexData;
- TDDMOD tmodData;
- TDDPATH tddpathData;
- TDDVIEW tddviewData;
- TDESCRIBE tdescData;
- TEDIT teditData; /* xInsert, xUpdate, xRemove */
- TFETCH tfetchData;
- TFIELD tfldData; /* used for both adds and deletes */
- TJOIN tjoinData;
- XLOGIN tloginData;
- TMASK tmaskData;
- TMOVEFLD tmovData;
- TNEW tnewData;
- TORDER tordData;
- TPASSWORD tpswdData;
- TRECALL trecallData;
- TREMALL tremallData;
- TRESET tresetData;
- TRESTRICT trestData;
- TSECURE tsecureData;
- TSTATUS tstatData;
- TSTORE tstoreData;
- TTRANS ttransData;
- TUPDALL tupdallData;
- TUSER tuserData;
- TVALIDATE tvalData;
- TVERSION tversionData;
- XCOMPILE xcData;
- XCONVERT xcnvData;
- XDESCRIBE xdData;
- XFETCH xfData;
- XFORMAT xfmData;
- XLOGIN xlData;
- XMASK xmaskData;
- XSPUTILITY xspData;
- XSTATUS xstData;
- XSUBST xsData;
- XVALID xvalData;
- XVERSION xvData;
- BBTRIEVE bxData;
- #if defined(BTI_DOS) || defined(BTI_DOS_32R) || \
- defined(BTI_DOS_32P) || defined(BTI_DOS_32B) || \
- defined(BTI_DOS_16B)
- DBNADD dbnAddData;
- DBNDROP dbnDropData;
- DBNGETCNT dbnGetCntData;
- DBNGETINFO dbnGetInfoData;
- DBNGETNAME dbnGetNameData;
- DBNMODINFO dbnModInfoData;
- DBNREN dbnRenameData;
- DBNUNLOAD dbnUnloadData;
- #endif
- } v;
- } PARMBLOCK;
-
-
- #ifdef __cplusplus
- }
- #endif
-
- #define _SQLAPI_H_INCLUDED
- #endif
-