home *** CD-ROM | disk | FTP | other *** search
- Attribute VB_Name = "Module2"
- '*************************************************************************
- '**
- '** Copyright 1997 Pervasive Software Inc. All Rights Reserved
- '**
- '*************************************************************************
- '*************************************************************************
- ' SQLAPI32.BAS
- ' This module is for use with 32-Bit Visual Basic for MS Windows 95 and
- ' MS NT with 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 "w3sqlv7.dll" (ByRef iSessionID%) As Integer
- Declare Function xPutSessionID Lib "w3sqlv7.dll" (ByVal iSessionID%) As Integer
-
- '*************************************************************************
- ' MISCELLANEOUS FUNCTIONS
- ' xShareSessionID
- ' SQLGetCountDatabaseNames
- ' SQLGetCountRemoteDatabaseNames
- ' SQLGetDatabaseNames
- ' SQLGetRemoteDatabaseNames
- ' SQLUnloadDBNames
- '*************************************************************************
- Declare Function xShareSessionID Lib "w3sqlv7.dll" alias "_xShareSessionID"( _
- ByRef tChangeCount&) As Integer
-
- Declare Function SQLGetCountDatabaseNames Lib "wdbnm32.dll" alias "_SQLGetCountDatabaseNames" ( _
- ByRef tCount&) As Integer
-
- Declare Function SQLGetCountRemoteDatabaseNames Lib "wdbnm32.dll" alias "_SQLGetCountRemoteDatabaseNames" ( _
- ByRef tCount&) As Integer
-
- Declare Function SQLGetDatabaseNames Lib "wdbnm32.dll" alias "_SQLGetDatabaseNames" ( _
- ByRef tBufLen&, _
- ByRef bDataBuf As Any) As Integer
-
- Declare Function SQLGetRemoteDatabaseNames Lib "wdbnm32.dll" alias "_SQLGetRemoteDatabaseNames" ( _
- ByRef tBufLen&, _
- ByRef bDataBuf As Any) As Integer
-
- Declare Function SQLUnloadDBNames Lib "wdbnm32.dll" alias "_SQLUnloadDBNames" _
- (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 "w3sqlv7.dll" alias "_XQLCompile" ( _
- ByVal iCursorID%, ByRef tStatementLen&, _
- ByRef sStatement As Any) As Integer
-
- Declare Function XQLConvert Lib "w3sqlv7.dll" alias "_XQLConvert" ( _
- 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 "w3sqlv7.dll" alias "_XQLCursor" ( _
- ByRef iCursorID%) As Integer
-
- Declare Function XQLDescribe Lib "w3sqlv7.dll" alias "_XQLDescribe" ( _
- ByVal iCursorID%, ByVal iPosition%, ByRef iDataType%, _
- ByRef tSize&, ByRef tDecPlaces&, ByRef tDisplayLen&, _
- ByRef tNameLen&, ByRef sName As Any) As Integer
-
- Declare Function XQLExec Lib "w3sqlv7.dll" alias "_XQLExec" ( _
- ByVal iCursorID%) As Integer
-
- Declare Function XQLFetch Lib "w3sqlv7.dll" alias "_XQLFetch" ( _
- ByVal iCursorID%, ByVal iOption%, _
- ByRef tBufLen&, ByRef bDataBuf As Any, ByRef lCount&, _
- ByVal iASCIIFlag%, ByVal iSpacing%) As Integer
-
- Declare Function XQLFormat Lib "w3sqlv7.dll" alias "_XQLFormat" ( _
- ByVal iCursorID%, ByVal tPosition&, ByVal tMaskLen&, _
- ByRef sMask As Any) As Integer
-
- Declare Function XQLFree Lib "w3sqlv7.dll" alias "_XQLFree" ( _
- ByVal iCursorID%) As Integer
-
- Declare Function XQLLogin Lib "w3sqlv7.dll" alias "_XQLLogin" ( _
- 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 "w3sqlv7.dll" alias "_XQLLogout" _
- () As Integer
-
- Declare Function XQLMask Lib "w3sqlv7.dll" alias "_XQLMask" ( _
- ByVal iOption%, ByVal iType%, ByVal tSize&, _
- ByVal tDec&, ByRef tLen&, ByRef sMask As Any) As Integer
-
- Declare Function XQLSPUtility Lib "w3sqlv7.dll" alias "_XQLSPUtility" ( _
- ByVal iCursorID%, ByVal iOption%, _
- ByRef tStatementCount&, ByRef tStatementExec&, _
- ByRef tBufLen&, ByRef bDataBuf As Any) As Integer
-
- Declare Function XQLStatus Lib "w3sqlv7.dll" alias "_XQLStatus" ( _
- ByVal iCursorID%, ByVal iOption%, _
- ByRef sStatBuf As Any) As Integer
-
- Declare Function XQLStop Lib "w3sqlv7.dll" alias "_XQLStop" _
- () As Integer
-
- Declare Function XQLSubst Lib "w3sqlv7.dll" alias "_XQLSubst" ( _
- ByVal iCursorID%, ByVal tCount&, _
- ByVal tNameLen&, ByRef sVarNames As Any, _
- ByVal tTextLen&, ByRef sValueText As Any) As Integer
-
- Declare Function XQLValidate Lib "w3sqlv7.dll" alias "_XQLValidate" ( _
- ByRef tCount&, ByRef sFieldName As Any, ByVal tBufLen&, _
- ByRef bDataBuf As Any) As Integer
-
- Declare Function XQLVersion Lib "w3sqlv7.dll" alias "_XQLVersion" ( _
- ByRef sVersion As Any) As Integer
-
- Declare Function xFetch Lib "w3sqlv7.dll" alias "_xFetch" ( _
- ByVal iCursorID%, ByRef tBufLen&, ByVal iOption%, _
- ByRef lRecordCount&, ByRef lRejectCount&, _
- ByRef bDataBuf As Any) As Integer
-
- Declare Function xInsert Lib "w3sqlv7.dll" alias "_xInsert" ( _
- ByVal iCursorID%, ByRef tFileCount&, _
- ByRef sFileName As Any, ByRef lRecordCount&, _
- ByRef bDataBuf As Any) As Integer
-
- Declare Function xRemove Lib "w3sqlv7.dll" alias "_xRemove" ( _
- ByVal iCursorID%, ByRef tFileCount&, _
- ByRef sFileName As Any, ByRef lRecordCount&) As Integer
-
- Declare Function xUpdate Lib "w3sqlv7.dll" alias "_xUpdate" ( _
- 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 "w3sqlv7.dll" alias "_xDD" ( _
- ByRef sPathName As Any, ByVal iOption%) As Integer
-
- Declare Function xDDAttr Lib "w3sqlv7.dll" alias "_xDDAttr" ( _
- ByVal iOption%, ByRef sFldName As Any, _
- ByVal iAttrType%, ByRef tBufLen&, _
- ByRef sAttrBuf As Any) As Integer
-
- Declare Function xDDCreate Lib "w3sqlv7.dll" alias "_xDDCreate" ( _
- 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 "w3sqlv7.dll" alias "_xDDDrop" ( _
- ByRef sName As Any, ByVal iType%, ByVal iDelete%) As Integer
-
- Declare Function xDDField Lib "w3sqlv7.dll" alias "_xDDField" ( _
- ByVal iOption%, ByRef iCount%, _
- ByRef sFldNames As Any, ByRef iBufLen%, _
- ByRef bDataBuf As Any) As Integer
-
- Declare Function xDDFile Lib "w3sqlv7.dll" alias "_xDDFile" ( _
- ByVal iOption%, ByRef tCount&, _
- ByRef sFileName As Any, ByRef tBufLen&, _
- bDataBuf As Any) As Integer
-
- Declare Function xDDIndex Lib "w3sqlv7.dll" alias "_xDDIndex" ( _
- ByVal iOption%, ByRef tCount&, _
- ByRef sIndexName As Any, ByRef tBufLen&, _
- ByRef bDataBuf As Any) As Integer
-
- Declare Function xDDModify Lib "w3sqlv7.dll" alias "_xDDModify" ( _
- 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 "w3sqlv7.dll" alias "_xDDPath" ( _
- ByVal iOption%, ByRef sPathName As Any) As Integer
-
- Declare Function xDDView Lib "w3sqlv7.dll" alias "_xDDView" ( _
- ByRef tCount&, ByRef sViewName As Any, _
- ByRef tBufLen&, ByRef bDataBuf As Any) As Integer
-
- ' -------------------------------------------------------
- ' Data Manipulation Primitives
- ' -------------------------------------------------------
- Declare Function xCompute Lib "w3sqlv7.dll" alias "_xCompute" ( _
- ByVal iCursorID%, ByRef sFldName As Any, _
- ByVal iFldType%, ByVal tFldLen&, ByVal tDecPlaces&, _
- ByRef tExpLen&, ByRef sExpression As Any) As Integer
-
- Declare Function xConvert Lib "w3sqlv7.dll" alias "_xConvert" ( _
- 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 "w3sqlv7.dll" alias "_xDescribe" ( _
- ByVal iCursorID%, ByVal iOption%, ByRef tBufLen&, _
- ByVal tPosition&, ByRef tCount&, bDataBuf As Any) As Integer
-
- Declare Function xField Lib "w3sqlv7.dll" alias "_xField" ( _
- ByVal iCursorID%, ByVal iOption%, ByVal tPosition&, _
- ByRef tCount&, ByRef sFldNames As Any) As Integer
-
- Declare Function xFree Lib "w3sqlv7.dll" alias "_xFree" ( _
- ByVal iCursorID%) As Integer
-
- Declare Function xJoin Lib "w3sqlv7.dll" alias "_xJoin" ( _
- 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 "w3sqlv7.dll" alias "_xMask" ( _
- ByVal iOption%, ByVal iType%, ByVal tSize&, ByVal iDec%, _
- ByRef tLen&, ByRef sMask As Any) As Integer
-
- Declare Function xMoveFld Lib "w3sqlv7.dll" alias "_xMoveFld" ( _
- ByVal iCursorID%, ByVal tFromPosition&, _
- ByVal tToPosition&) As Integer
-
- Declare Function xNew Lib "w3sqlv7.dll" alias "_xNew" ( _
- ByRef iCursorID%, ByRef sFileName As Any, _
- ByRef sOwner As Any, ByVal iOpenMode%) As Integer
-
- Declare Function xOrder Lib "w3sqlv7.dll" alias "_xOrder" ( _
- ByVal iCursorID%, ByVal tCount&, _
- ByRef bOrderFld As Any) As Integer
-
- Declare Function xRecall Lib "w3sqlv7.dll" alias "_xRecall" ( _
- 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 "w3sqlv7.dll" alias "_xRemall" ( _
- ByVal iCursorID%, ByRef tFileCount&, _
- ByRef sFileName As Any, ByVal iOption%, _
- ByRef lRecordCount As Long, ByRef lRejectCount As Long) As Integer
-
- Declare Function xReset Lib "w3sqlv7.dll" alias "_xReset" ( _
- ByRef sReserved As Any) As Integer
-
- Declare Function xRestrict Lib "w3sqlv7.dll" alias "_xRestrict" ( _
- ByVal iCursorID%, ByVal iOption%, _
- ByRef tExpLen&, ByRef sExpression As Any) As Integer
-
- Declare Function xStatus Lib "w3sqlv7.dll" alias "_xStatus" ( _
- ByVal iCursorID%, ByVal iOption%, ByRef tLen&, _
- ByRef sStatBuf As Any) As Integer
-
- Declare Function xStore Lib "w3sqlv7.dll" alias "_xStore" ( _
- ByVal iCursorID%, ByRef sViewName As Any, _
- ByVal iTextLen%, ByRef sText As Any) As Integer
-
- Declare Function xTrans Lib "w3sqlv7.dll" alias "_xTrans" ( _
- ByVal iOption%) As Integer
-
- Declare Function xUpdall Lib "w3sqlv7.dll" alias "_xUpdall" ( _
- 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 "w3sqlv7.dll" alias "_xValidate" ( _
- ByRef tCount&, ByRef sFieldName As Any, _
- ByVal tBufLen&, ByRef bDataBuf As Any) As Integer
-
- '--------------------------------------------------
- ' Data Control Primitives
- '--------------------------------------------------
- Declare Function xAccess Lib "w3sqlv7.dll" alias "_xAccess" ( _
- 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 "w3sqlv7.dll" alias "_xChar" ( _
- ByVal iOption%, ByVal iType%, _
- ByRef cCharacter As Any) As Integer
-
- Declare Function xLogin Lib "w3sqlv7.dll" alias "_xLogin" ( _
- 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 "w3sqlv7.dll" alias "_xLogout" _
- () As Integer
-
- Declare Function xPassword Lib "w3sqlv7.dll" alias "_xPassword" ( _
- ByRef sUser As Any, ByRef sPassword As Any) As Integer
-
- Declare Function xSecurity Lib "w3sqlv7.dll" alias "_xSecurity" ( _
- ByRef sMstrPswd As Any, ByVal iOption%) As Integer
-
- Declare Function xStop Lib "w3sqlv7.dll" alias "_xStop" _
- () As Integer
-
- Declare Function xUser Lib "w3sqlv7.dll" alias "_xUser" ( _
- 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 "w3sqlv7.dll" alias "_xVersion" ( _
- ByRef sVersion As Any) As Integer
-