home *** CD-ROM | disk | FTP | other *** search
- '*************************************************************************
- '**
- '** Copyright 1997 Pervasive Software Inc. All Rights Reserved
- '**
- '*************************************************************************
- '*************************************************************************
- ' SQLAPI16.BAS
- ' This module is for use with 16-Bit Visual Basic for MS-Windows and
- ' Scalable SQL. It contains declarations for Scalable SQL APIs.
- '
- '*************************************************************************
- '*************************************************************************
- ' SESSION MANAGEMENT PRIMITIVES
- ' The following primitives are required by applications which
- ' want to use multiple SQL logins:
- ' xGetSessionID
- ' xPutSessionID
- '*************************************************************************
- Declare Function xGetSessionID Lib "w1sqlv7.dll" ( ByRef iSessionID% ) As Integer
- Declare Function xPutSessionID Lib "w1sqlv7.dll" ( ByVal iSessionID% ) As Integer
-
- '*************************************************************************
- ' MISCELLANEOUS FUNCTIONS
- ' xShareSessionID
- ' SQLGetCountDatabaseNames
- ' SQLGetCountRemoteDatabaseNames
- ' SQLGetDatabaseNames
- ' SQLGetRemoteDatabaseNames
- ' SQLUnloadDBNames
- '*************************************************************************
- Declare Function xShareSessionID Lib "w1sqlv7.dll" ( _
- ByRef tChangeCount% ) As Integer
-
- Declare Function SQLGetCountDatabaseNames Lib "wdbnames.dll" ( _
- ByRef tCount% ) As Integer
-
- Declare Function SQLGetCountRemoteDatabaseNames Lib "wdbnames.dll" ( _
- ByRef tCount% ) As Integer
-
- Declare Function SQLGetDatabaseNames Lib "wdbnames.dll" ( _
- ByRef tBufLen%, _
- ByRef bDataBuf As Any ) As Integer
-
- Declare Function SQLGetRemoteDatabaseNames Lib "wdbnames.dll" ( _
- ByRef tBufLen%, _
- ByRef bDataBuf As Any ) As Integer
-
- Declare Function SQLUnloadDBNames Lib "wdbnames.dll" _
- ( ByVal iReserved% ) As Integer
-
-
- '*************************************************************************
- ' SQL-LEVEL FUNCTIONS
- ' This includes 4 former Primitive-Level Functions.
- ' XQLCursor XQLSPUtility xFetch
- ' XQLCompile XQLStatus xInsert
- ' XQLDescribe XQLStop xRemove
- ' XQLExec XQLSubst xUpdate
- ' XQLFetch XQLVersion
- ' XQLFormat XQLConvert
- ' XQLFree XQLValidate
- ' XQLLogin XQLMask
- ' XQLLogout
- '*************************************************************************
- Declare Function XQLCompile Lib "w1sqlv7.dll" ( _
- ByVal iCursorID%, ByRef tStatementLen%, _
- ByRef sStatement As Any ) As Integer
-
- Declare Function XQLConvert Lib "w1sqlv7.dll" ( _
- ByVal iOption%, ByVal iType%, ByVal tSize%, _
- ByVal tDec%, ByVal tDSize%, ByRef sValue As Any, _
- ByRef sRetValue As Any, ByRef sMask As Any, _
- ByVal iJustify% ) As Integer
-
- Declare Function XQLCursor Lib "w1sqlv7.dll" ( _
- ByRef iCursorID% ) As Integer
-
- Declare Function XQLDescribe Lib "w1sqlv7.dll" ( _
- ByVal iCursorID%, ByVal iPosition%, ByRef iDataType%, _
- ByRef tSize%, ByRef tDecPlaces%, ByRef tDisplayLen%, _
- ByRef tNameLen%, ByRef sName As Any ) As Integer
-
- Declare Function XQLExec Lib "w1sqlv7.dll" ( _
- ByVal iCursorID% ) As Integer
-
- Declare Function XQLFetch Lib "w1sqlv7.dll" ( _
- ByVal iCursorID%, ByVal iOption%, _
- ByRef tBufLen%, ByRef bDataBuf As Any, ByRef lCount&, _
- ByVal iASCIIFlag%, ByVal iSpacing% ) As Integer
-
- Declare Function XQLFormat Lib "w1sqlv7.dll" ( _
- ByVal iCursorID%, ByVal tPosition%, ByVal tMaskLen%, _
- ByRef sMask As Any ) As Integer
-
- Declare Function XQLFree Lib "w1sqlv7.dll" ( _
- ByVal iCursorID% ) As Integer
-
- Declare Function XQLLogin Lib "w1sqlv7.dll" ( _
- ByRef sUser As Any, ByRef sPassword As Any, _
- ByRef sDDPath As Any, ByRef sDataPath As Any, _
- ByRef sReserved As Any, ByVal iFeaturesUsed% ) As Integer
-
- Declare Function XQLLogout Lib "w1sqlv7.dll" () As Integer
-
- Declare Function XQLMask Lib "w1sqlv7.dll" ( _
- ByVal iOption%, ByVal iType%, ByVal tSize%, _
- ByVal tDec%, ByRef tLen%, ByRef sMask As Any ) As Integer
-
- Declare Function XQLSPUtility Lib "w1sqlv7.dll" ( _
- ByVal iCursorID%, ByVal iOption%, _
- ByRef tStatementCount%, ByRef tStatementExec%, _
- ByRef tBufLen%, ByRef bDataBuf As Any ) As Integer
-
- Declare Function XQLStatus Lib "w1sqlv7.dll" ( _
- ByVal iCursorID%, ByVal iOption%, _
- ByRef sStatBuf As Any ) As Integer
-
- Declare Function XQLStop Lib "w1sqlv7.dll" () As Integer
-
- Declare Function XQLSubst Lib "w1sqlv7.dll" ( _
- ByVal iCursorID%, ByVal tCount%, _
- ByVal tNameLen%, ByRef sVarNames As Any, _
- ByVal tTextLen%, ByRef sValueText As Any ) As Integer
-
- Declare Function XQLValidate Lib "w1sqlv7.dll" ( _
- ByRef tCount%, ByRef sFieldName As Any, ByVal tBufLen%, _
- ByRef bDataBuf As Any ) As Integer
-
- Declare Function XQLVersion Lib "w1sqlv7.dll" ( _
- ByRef sVersion As Any ) As Integer
-
- Declare Function xFetch Lib "w1sqlv7.dll" ( _
- ByVal iCursorID%, ByRef tBufLen%, ByVal iOption%, _
- ByRef lRecordCount&, ByRef lRejectCount&, _
- ByRef bDataBuf As Any ) As Integer
-
- Declare Function xInsert Lib "w1sqlv7.dll" ( _
- ByVal iCursorID%, ByRef tFileCount%, _
- ByRef sFileName As Any, ByRef lRecordCount&, _
- ByRef bDataBuf As Any ) As Integer
-
- Declare Function xRemove Lib "w1sqlv7.dll" ( _
- ByVal iCursorID%, ByRef tFileCount%, _
- ByRef sFileName As Any, ByRef lRecordCount& ) As Integer
-
- Declare Function xUpdate Lib "w1sqlv7.dll" ( _
- ByVal iCursorID%, ByRef tFileCount%, _
- ByRef sFileName As Any, ByRef lRecordCount&, _
- ByRef bDataBuf As Any ) As Integer
-
- '***********************************************************************
- ' 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 xReset xDDModify xSecurity
- ' xField xRestrict xDDCreate xUser
- ' xFree xStore xDDDrop xChar
- ' xJoin xStop xDDField xVersion
- ' xLogin xTrans xDDFile xStatus
- ' xLogout xRecall xDDIndex xConvert
- ' xNew xUpdall xDDPath xValidate
- ' xDDView xMask
- '***********************************************************************
- '------------------------------------------------
- ' Dictionary Primitives
- '------------------------------------------------
- Declare Function xDD Lib "w1sqlv7.dll" ( _
- ByRef sPathName As Any, ByVal iOption% ) As Integer
-
- Declare Function xDDAttr Lib "w1sqlv7.dll" ( _
- ByVal iOption%, ByRef sFldName As Any, _
- ByVal iAttrType%, ByRef tBufLen%, _
- ByRef sAttrBuf As Any ) As Integer
-
- Declare Function xDDCreate Lib "w1sqlv7.dll" ( _
- ByVal iOption%, ByRef sFileName As Any, _
- ByVal iCreate%, ByRef sPathName As Any, _
- ByRef sOwner As Any, ByVal iOwnerFlag%, _
- ByVal tFldCount%, ByRef bFldBuf As Any, _
- ByVal tIndxCount%, ByRef bIndx As Any, _
- ByVal tLen%, ByRef bCPrms As Any ) As Integer
-
- Declare Function xDDDrop Lib "w1sqlv7.dll" ( _
- ByRef sName As Any, ByVal iType%, ByVal iDelete% ) As Integer
-
- Declare Function xDDField Lib "w1sqlv7.dll" ( _
- ByVal iOption%, ByRef iCount%, _
- ByRef sFldNames As Any, ByRef iBufLen%, _
- ByRef bDataBuf As Any ) As Integer
-
- Declare Function xDDFile Lib "w1sqlv7.dll" ( _
- ByVal iOption%, ByRef tCount%, _
- ByRef sFileName As Any, ByRef tBufLen%, _
- bDataBuf As Any ) As Integer
-
- Declare Function xDDIndex Lib "w1sqlv7.dll" ( _
- ByVal iOption%, ByRef tCount%, _
- ByRef sIndexName As Any, ByRef tBufLen%, _
- ByRef bDataBuf As Any ) As Integer
-
- Declare Function xDDModify Lib "w1sqlv7.dll" ( _
- ByVal iOption%, ByRef sFileName As Any, _
- ByVal iCreate%, ByRef sPathName As Any, _
- ByRef sOwner As Any, ByVal iOwnerFlag%, _
- ByVal tFldCount%, ByRef bFldBuf As Any, _
- ByVal tIndxCount%, ByRef bIndxBuf As Any ) As Integer
-
- Declare Function xDDPath Lib "w1sqlv7.dll" ( _
- ByVal iOption%, ByRef sPathName As Any ) As Integer
-
- Declare Function xDDView Lib "w1sqlv7.dll" ( _
- ByRef tCount%, ByRef sViewName As Any, _
- ByRef tBufLen%, ByRef bDataBuf As Any ) As Integer
-
- ' -------------------------------------------------------
- ' Data Manipulation Primitives
- ' -------------------------------------------------------
- Declare Function xCompute Lib "w1sqlv7.dll" ( _
- ByVal iCursorID%, ByRef sFldName As Any, _
- ByVal iFldType%, ByVal tFldLen%, ByVal tDecPlaces%, _
- ByRef tExpLen%, ByRef sExpression As Any ) As Integer
-
- Declare Function xConvert Lib "w1sqlv7.dll" ( _
- ByVal iOption%, ByVal iType%, ByVal tSize%, ByVal tDec%, _
- ByVal tDSize%, ByRef sValue As Any, _
- ByRef sRetVal As Any, ByRef sMask As Any, _
- ByVal iJustify% ) As Integer
-
- Declare Function xDescribe Lib "w1sqlv7.dll" ( _
- ByVal iCursorID%, ByVal iOption%, ByRef tBufLen%, _
- ByVal tPosition%, ByRef tCount%, bDataBuf As Any ) As Integer
-
- Declare Function xField Lib "w1sqlv7.dll" ( _
- ByVal iCursorID%, ByVal iOption%, ByVal tPosition%, _
- ByRef tCount%, ByRef sFldNames As Any ) As Integer
-
- Declare Function xFree Lib "w1sqlv7.dll" ( _
- ByVal iCursorID% ) As Integer
-
- Declare Function xJoin Lib "w1sqlv7.dll" ( _
- ByVal iCursorID%, ByRef sSecFile As Any, _
- ByRef sOwner As Any, ByVal iOption%, ByVal tPriFldCount%, _
- ByRef sPriFlds As Any, ByVal tSecFldCount%, _
- ByRef sSecFlds As Any ) As Integer
-
- Declare Function xMask Lib "w1sqlv7.dll" ( _
- ByVal iOption%, ByVal iType%, ByVal tSize%, ByVal iDec%, _
- ByRef tLen%, ByRef sMask As Any ) As Integer
-
- Declare Function xMoveFld Lib "w1sqlv7.dll" ( _
- ByVal iCursorID%, ByVal tFromPosition%, _
- ByVal tToPosition% ) As Integer
-
- Declare Function xNew Lib "w1sqlv7.dll" ( _
- ByRef iCursorID%, ByRef sFileName As Any, _
- ByRef sOwner As Any, ByVal iOpenMode% ) As Integer
-
- Declare Function xOrder Lib "w1sqlv7.dll" ( _
- ByVal iCursorID%, ByVal tCount%, _
- ByRef bOrderFld As Any ) As Integer
-
- Declare Function xRecall Lib "w1sqlv7.dll" ( _
- iCursorID%, ByRef sViewName As Any, ByVal iOwnerCount%, _
- ByRef sOwner As Any, ByVal iOpenMode%, ByRef iTextLen%, _
- ByRef sText As Any ) As Integer
-
- Declare Function xRemall Lib "w1sqlv7.dll" ( _
- ByVal iCursorID%, ByRef tFileCount%, _
- ByRef sFileName As Any, ByVal iOption%, _
- ByRef lRecordCount As Long, ByRef lRejectCount As Long ) As Integer
-
- Declare Function xReset Lib "w1sqlv7.dll" ( _
- ByRef sReserved As Any ) As Integer
-
- Declare Function xRestrict Lib "w1sqlv7.dll" ( _
- ByVal iCursorID%, ByVal iOption%, _
- ByRef tExpLen%, ByRef sExpression As Any ) As Integer
-
- Declare Function xStatus Lib "w1sqlv7.dll" ( _
- ByVal iCursorID%, ByVal iOption%, ByRef tLen%, _
- ByRef sStatBuf As Any ) As Integer
-
- Declare Function xStore Lib "w1sqlv7.dll" ( _
- ByVal iCursorID%, ByRef sViewName As Any, _
- ByVal iTextLen%, ByRef sText As Any ) As Integer
-
- Declare Function xTrans Lib "w1sqlv7.dll" ( _
- ByVal iOption% ) As Integer
-
- Declare Function xUpdall Lib "w1sqlv7.dll" ( _
- ByVal iCursorID%, ByRef tFileCount%, _
- ByRef sFileName As Any, ByVal iOption%, _
- ByRef lRecordCount As Long, ByRef lRejectCount As Long, _
- ByVal tFldCount%, ByRef sUpdateFld As Any, _
- ByRef sReplaceFld As Any ) As Integer
-
- Declare Function xValidate Lib "w1sqlv7.dll" ( _
- ByRef tCount%, ByRef sFieldName As Any, _
- ByVal tBufLen%, ByRef bDataBuf As Any ) As Integer
-
- '--------------------------------------------------
- ' Data Control Primitives
- '--------------------------------------------------
- Declare Function xAccess Lib "w1sqlv7.dll" ( _
- ByRef sMstrPswd As Any, ByRef sUser As Any, _
- ByVal iOption%, ByVal iAccRights%, _
- ByRef sFileName As Any, ByRef tCount%, _
- ByRef sFldNames As Any, ByRef tBufLen%, _
- bDataBuf As Any ) As Integer
-
- Declare Function xChar Lib "w1sqlv7.dll" ( _
- ByVal iOption%, ByVal iType%, _
- ByRef cCharacter As Any ) As Integer
-
- Declare Function xLogin Lib "w1sqlv7.dll" ( _
- ByRef sUser As Any, ByRef sPassword As Any, _
- ByRef sDDPath As Any, ByRef sDataPath As Any, _
- ByRef sReserved As Any, ByVal iFeaturesUsed% ) As Integer
-
- Declare Function xLogout Lib "w1sqlv7.dll" ( ) As Integer
-
- Declare Function xPassword Lib "w1sqlv7.dll" ( _
- ByRef sUser As Any, ByRef sPassword As Any ) As Integer
-
- Declare Function xSecurity Lib "w1sqlv7.dll" ( _
- ByRef sMstrPswd As Any, ByVal iOption%) As Integer
-
- Declare Function xStop Lib "w1sqlv7.dll" ( ) As Integer
-
- Declare Function xUser Lib "w1sqlv7.dll" ( _
- ByRef sMstrPswd As Any, ByVal iOption%, _
- ByRef sUser As Any, ByRef sPassword As Any, _
- ByVal iFlags%, ByRef tCount%, ByRef tBufLen%, _
- bDataBuf As Any ) As Integer
-
- Declare Function xVersion Lib "w1sqlv7.dll" ( _
- ByRef sVersion As Any ) As Integer
-