home *** CD-ROM | disk | FTP | other *** search
- '********************************************************************************************************************************************************
- ' PxEngine.RLZ Version: 1.1
- '
- ' Paradox(TM) Engine Interface for Realizer Version 1.0
- ' Paradox is a trademark of Borland International.
- '
- ' Copyright ⌐ 1991-1992 Computer Associates International, Inc.
- ' All rights reserved.
- '
- ' Realizer Version 1.0 high-level Paradox Engine 2.0 interface.
- '
- ' The entire low-level Paradox Engine 2.0 interface is included in PxEngine along with error numbers, constants, and routines
- ' for testing field contents. Complete documentation on the Paradox engine is available with the purchase of the engine
- ' from Borland International. Included, in PXEngin2.RLZ, is the complete high-level interface to the Paradox Engine 2.0.
- '
- ' NOTE:
- ' When using the PXTblCreate routine the PDoxDLL.EXE Dynamic Link Library (DLL) must be copied to the
- ' Windows directory (same directory as the PXEngWin.DLL). This DLL is designed to support the double
- ' pointer reference for the fieldList and typeList parameters. PXTblCreate has the following interface from
- ' Realizer:
- ' fieldList = {"Name", "Address", "Zip", "Age", "Salary"}
- ' typeList = {"A20", "A30", "A5", "S", "$"}
- ' error = PXTblCreate("Sample", 5, fieldList, typeList)
- '
- ' High-level overview:
- ' PXEngine supports the low-level interface to the Paradox Engine 2.0
- ' from Borland International. PXEngine also includes a high-level
- ' interface to the engine. The purpose of the high-level interface
- ' is to eliminate, for the average Paradox programmer, the handling of table handles, record buffers,
- ' field buffers and knowledge of each field type to get or put data to a field. The high-level PXEngine interface
- ' assumes upto 5 tables (files) can be openned at a time and routines such as Search and GotoRecord to change the
- ' current record pointer in a table. Access to data is performed on a record-by-record basis therefore to look at data
- ' a GetRecord must first be called to move the entire record to a Working-Record-Buffer (WRB). To read or write data
- ' for a field use GetField or PutField depending upon the operation required. To update the current record with the
- ' data in the current (WRB) use UpdateRecord, use AddRecord to add the current WRB as a new record. To delete
- ' the current WRB from the table use DeleteRecord. Use SelectTable to change the current table to another openned
- ' table or CurrentTable to return the current table ID
- '
- ' High-level routines:
- ' PROC SelectTable (tableID) - Change the current table to the table with the tableID reference, all subsequent
- ' Paradox calls are directed to this table.
- ' FUNC CurrentTable - Return the tableID of the current table.
- ' FUNC ParadoxInit - Initialize Paradox Engine for Windows.
- ' FUNC ParadoxExit - Unload the Paradox Engine DLL for this application.
- ' FUNC OpenTable (tbl) - Open an existing Paradox database file (table).
- ' FUNC CloseTable - Close the openned database file (table).
- ' FUNC GetRecNumber - Return the current record number.
- ' FUNC GotoRecord (recNumber) - Make the recNumber the current record.
- ' FUNC Search(whichField, what, searchHow) - Find a record that matches whichField with the what buffer.
- ' FUNC GetRecord - Get the current record into the record buffer, use GetField to see the data.
- ' FUNC NewRecord - Make the current record buffer an empty record buffer.
- ' FUNC GetField (whichField, buff) - Get a field for the current record buffer.
- ' FUNC PutField (whichField, buff) - Change a field's data for the current record buffer.
- ' FUNC BlankField (whichField) - Blank the field in the current record buffer.
- ' FUNC IsBlankField (whichField) - Is the field in the current record buffer blank.
- ' FUNC InsertRecord - Insert a record into the database file (table).
- ' FUNC UpdateRecord - Update the current record.
- ' FUNC DeleteRecord - Delete the current record
- ' FUNC GotoRecord - Goto a particular record number.
- '
- ' High-level usage:
- ' First initialize the engine with the ParadoxInit call and then open an existing table with OpenTable. OpenTable
- ' sets %%currentTable to the id of table just openned. There are a couple of different ways to access data.
- ' To search for an existing record use the Search routine followed by GetRecord to load the current record
- ' (record found) into the record buffer use multiple GetField calls to retrieve each field for the record.
- '*******************************************************************************************************************************************************
- IF QVar(%%PXEngine, _Defined) THEN
- EXIT MACRO
- END IF
- %%PXEngine = 1
-
- PDX_Version = 17369347 ' 0x01090903 Version # same as found in .lib files.
-
- ' Maximum and default values for dynamic configuration. The default values are used if not overwritten in WIN.INI.
- PDX_PXDefault = 0 ' Use internal default value.
- PDX_MAXTABLEHANDLES = 64 ' Max # open tables allowed at a time.
- PDX_DEFTABLEHANDLES = 5 ' Default # open tables allowed at a time.
- PDX_MAXRECORDHANDLES = 128 ' Max # of record buffers available.
- PDX_DEFRECORDHANDLES = 10 ' Default number of record buffers available.
- PDX_MAXLOCKHANDLES = 128 ' Max #r of lock handles per table.
- PDX_DEFLOCKHANDLES = 32 ' Default number of lock handles per table.
- PDX_MAXFILEHANDLES = 255 ' Max # of DOS file handles to use.
- PDX_MINFILEHANDLES = 2 ' Min # of DOS file handles to use.
- PDX_DEFFILEHANDLES = 10 ' Default number of DOS file handles to use.
-
- ' Swap buffer size
- PDX_MAXSWAPSIZE = 256 ' Max buffer size allowed (k)
- PDX_MINSWAPSIZE = 8 ' Min buffer size allowed (k)
- PDX_DEFSWAPSIZE = 32 ' Default buffer size (k)
-
-
- PDX_DEFSORTORDER = -1 ' Default sort order (ASCII)
-
- ' Values for ShareMode argument to PXWinInit.
- PDX_PXSINGLECLIENT = 0 ' Allow no other client access to Engine DLL.
- PDX_PXEXCLUSIVE = 1 ' Open all tables with FULL LOCK.
- PDX_PXSHARED = 2 ' Open all tables with PREVENT FULL LOCK.
-
- ' Used in PXKeyAdd.
- PDX_PRIMARY = 0 ' Primary index (key).
- PDX_SECONDARY = 1 ' Not maintained secondary index.
- PDX_INCSECONDARY = 2 ' Mmaintained secondary index.
-
- ' Used in PXSrchFld, PXSrchKey.
- PDX_SEARCHFIRST = 0 ' Search from beginning of table.
- PDX_SEARCHNEXT = 1 ' Search from next record in table.
- PDX_CLOSESTRECORD = 2 ' (modifier) goto 'nearest' record if no match found (ordered fields only).
-
- ' Lock types used in PXNetFileLock, PXNetFileUnlock, PXNetTblLock, PXNetTblUnlock.
- PDX_FL = 1 ' Full lock, no concurrency.
- PDX_WL = 2 ' Write lock.
- PDX_PWL = 3 ' Prevent write lock.
- PDX_PFL = 4 ' Prevent full lock, full concurrency.
-
- ' Declarations of sort order tables, used in PXSetDefaults.
- PDX_SortOrderAscii = "a" ' ASCII sort order.
- PDX_SortOrderIntl = "i" ' International sort order.
- PDX_SortOrderNorDan = "n" ' Norwegian/Danish sort order.
- PDX_SortOrderSwedFin = "s" ' Swedish/Finnish sort order.
-
- ' Macros for checking blank values.
- PDX_BLANKDATE = 2147483648 '0x80000000L
- PDX_BLANKLONG = 2147483648 '0x80000000L
- PDX_BLANKSHORT = 32768 '0x8000
-
- FUNC PXISBLANKALPHA (x)
- RETURN(LEN(x) = 0)
- END FUNC
-
- FUNC PXISBLANKSHORT(x)
- RETURN(x = PDX_BLANKSORT)
- END FUNC
-
- FUNC PXISBLANKLONG(x)
- RETURN(x = PDX_BLANKLONG)
- END FUNC
-
- FUNC PXISBLANKDATE(x)
- RETURN(x = PDX_BLANKDATE)
- END FUNC
-
- ' Successful Engine function operation returns.
-
- PDX_PXSUCCESS = 0
-
- ' ENGINE ERROR CODES:
-
- ' Initialization errors:
- PDX_PXERR_NOTINITERR = 78 ' Engine not initialized.
- PDX_PXERR_ALREADYINIT = 82 ' Engine already initialized.
- PDX_PXERR_NOTLOGGEDIN = 98 ' Could not login on network (to PARADOX.NET).
- PDX_PXERR_NONETINIT = 107 ' Engine not initialized with PXNetInit.
- PDX_PXERR_NETMULTIPLE = 15 ' Multiple PARADOX.NET files.
- PDX_PXERR_CANTSHAREPDOXNET = 134 ' Can't lock PARADOX.NET -- is SHARE.EXE loaded?
- PDX_PXERR_WINDOWSREALMODE = 135 ' Can't run Engine in Windows real mode.
-
- ' Hardware related errors:
- PDX_PXERR_DRIVENOTREAD = 1 ' Drive not ready.
- PDX_PXERR_DISKWRITEPRO = 124 ' Disk is write protected.
- PDX_PXERR_GENERALFAIL = 126 ' General hardware error.
-
- ' Directory reg error codes:
- PDX_PXERR_DIRNOTFOUND = 2 ' Directory not found.
- PDX_PXERR_DIRBUSY = 10 ' Sharing violation
- PDX_PXERR_DIRLOCKED = 11 ' Sharing violation
- PDX_PXERR_DIRNOACCESS = 12 ' No access to directory
- PDX_PXERR_DIRNOTPRIVATE = 14 ' Single user, but directory is shared.
-
- ' File oriented errors:
- PDX_PXERR_FILEBUSY = 3 ' File is busy.
- PDX_PXERR_FILELOCKED = 4 ' File is locked.
- PDX_PXERR_FILENOTFOUND = 5 ' Could not find file.
-
- ' Table oriented errors:
- PDX_PXERR_TABLEBUSY = 118 ' Table is busy.
- PDX_PXERR_TABLELOCKED = 119 ' Table is locked.
- PDX_PXERR_TABLENOTFOU = 120 ' Table was not found.
- PDX_PXERR_TABLEOPEN = 83 ' Unable to perform operation on open table.
- PDX_PXERR_TABLEINDEXED = 94 ' Table is indexed.
- PDX_PXERR_TABLENOTIND = 95 ' Table is not indexed.
- PDX_PXERR_TABLEEMPTY = 105 ' Operation on empty table.
- PDX_PXERR_TABLEWRITEPR = 22 ' Table is write protected.
- PDX_PXERR_TABLECORRUPT = 6 ' Table is corrupted.
- PDX_PXERR_TABLEFULL = 128 ' Table is full.
- PDX_PXERR_TABLESQL = 130 ' Table is SQL replica.
- PDX_PXERR_INSUFRIGHTS = 21 ' Insufficient password rights.
-
- ' Index oriented errors:
- PDX_PXERR_XCORRUPTED = 7 ' Primary index is corrupted.
- PDX_PXERR_XOUTOFDATE = 8 ' Primary index is out of date.
- PDX_PXERR_XSORTVERSION = 13 ' Sort for index different from table.
- PDX_PXERR_SXCORRUPTED = 122 ' Secondary index is corrupted.
- PDX_PXERR_SXOUTOFDATE = 96 ' Secondary index is out of date.
- PDX_PXERR_SXNOTFOUND = 121 ' Secondary index was not found.
- PDX_PXERR_SXOPEN = 123 ' Secondary index is already open.
- PDX_PXERR_SXCANTUPDATE = 136 ' Can't update Heap open on Secondary.
- PDX_PXERR_RECTOOBIG = 125 ' Record too big for index.
-
- ' Record oriented errors:
- PDX_PXERR_RECDELETED = 50 ' Another user deleted record.
- PDX_PXERR_RECLOCKED = 9 ' Record is locked.
- PDX_PXERR_RECNOTFOUND = 89 ' Record was not found.
- PDX_PXERR_KEYVIOL = 97 ' Key violation.
- PDX_PXERR_ENDOFTABLE = 101 ' End of table.
- PDX_PXERR_STARTOFTABLE = 102 ' Start of table.
-
- ' Errors specific for Windows Engine DLL:
- PDX_PXERR_TOOMANYCLIEN = 131
- PDX_PXERR_EXCEEDSCONF = 132
- PDX_PXERR_CANTREMAPFIL = 133
-
- ' Resource errors:
- PDX_PXERR_OUTOFMEM = 40 ' Not enough memory to complete operation.
- PDX_PXERR_OUTOFDISK = 41 ' Not enough disk space to complete operation.
- PDX_PXERR_OUTOFSTACK = 127 ' Not enough stack space to complete operation.
- PDX_PXERR_OUTOFSWAPBU = 129 ' Not enough swap buffer space to complete operation.
- PDX_PXERR_OUTOFFILEHDL = 70 ' No more file handles available.
- PDX_PXERR_OUTOFTABLEH = 72 ' No more table handles available.
- PDX_PXERR_OUTOFRECHDL = 103 ' No more record handles available.
- PDX_PXERR_OUTOFLOCKHDL = 111 ' Too many locks on table.
- PDX_PXERR_NOMORETMPN = 86 ' No more temporary names available.
- PDX_PXERR_TOOMANYPASS = 115 ' Too many passwords specified.
-
- ' Invalid parameters to functions:
- PDX_PXERR_TYPEMISMATCH = 30 ' Data type mismatch.
- PDX_PXERR_OUTOFRANGE = 31 ' Argument out of range.
- PDX_PXERR_INVPARAMETER = 33 ' Invalid argument.
- PDX_PXERR_INVDATE = 73 ' Invalid date given.
- PDX_PXERR_INVFIELDHAND = 75 ' Invalid field handle.
- PDX_PXERR_INVRECHANDLE = 104 ' Invalid record handle.
- PDX_PXERR_INVTABLEHAND = 76 ' Invalid table handle.
- PDX_PXERR_INVLOCKHAND = 110 ' Invalid lock handle.
- PDX_PXERR_INVDIRNAME = 114 ' Invalid directory name.
- PDX_PXERR_INVFILENAME = 108 ' Invalid file name.
- PDX_PXERR_INVTABLENAME = 99 ' Invalid table name.
- PDX_PXERR_INVFIELDNAME = 74 ' Invalid field name.
- PDX_PXERR_INVLOCKCODE = 106 ' Invalid lock code.
- PDX_PXERR_INVUNLOCK = 109 ' Invalid unlock.
- PDX_PXERR_INVSORTORDER = 112 ' Invalid sort order table.
- PDX_PXERR_INVPASSW = 116 ' Invalid password.
- PDX_PXERR_INVNETTYPE = 113 ' Invalid net type (PXNetInit).
- PDX_PXERR_BUFTOOSMALL = 117 ' Buffer too small for result.
- PDX_PXERR_STRUCTDIFFER = 81 ' Table structures are different.
- PDX_PXERR_INVENGINESTAT = 79 ' Previous fatal error; cannot proceed.
-
-
- '------------------------------------------------------------------------------------ Engine Routines ------------------------------------------------------------------------------------
-
-
- ' INITIALIZATION AND FINALIZATION FUNCTIONS.
-
- ' Iinitialize Engine connection.
- EXTERNAL "PXEngWin.DLL" FUNC PXWinInit (POINTER clientName, INTEGER ShareMode) AS INTEGER
-
- ' Exit and deallocate.
- EXTERNAL "PXEngWin.DLL" FUNC PXExit AS INTEGER
-
- ' Overwrites internal default values.
- EXTERNAL "PXEngWin.DLL" FUNC PXSetDefaults (INTEGER bufSize, INTEGER maxTables, INTEGER maxRecBufs, INTEGER maxLocks, INTEGER maxFiles, CHAR sortOrder) AS INTEGER
-
- ' Returns current default settings.
- EXTERNAL "PXEngWin.DLL" FUNC PXGetDefaults (POINTER swapSize, POINTER maxTables, POINTER maxRecBufs, POINTER MaxLocks, POINTER maxFiles, POINTER sortTable) AS INTEGER
-
-
- ' UTILITY FUNCTIONS.
-
- EXTERNAL "PXEngWin.DLL" FUNC ISBLANKDOUBLE (REAL x) as INTEGER
- EXTERNAL "PXEngWin.DLL" PROC BLANKDOUBLE (POINTER)
-
-
- ' TABLE FUNCTIONS
-
- ' Open table for access, returning table handle.
- EXTERNAL "PXEngWin.DLL" FUNC PXTblOpen (POINTER tblName, POINTER ptblHandle, INTEGER indexID, INTEGER saveEveryChange) AS INTEGER
-
- ' Close access to table.
- EXTERNAL "PXEngWin.DLL" FUNC PXTblClose (WORD tblHandle) AS INTEGER
-
- ' Create empty table.
- FUNC PXTblCreate(tName, nFlds, flds, typ)
- EXTERNAL "PDoxDLL" FUNC PDXTblCreate (POINTER tblName, INTEGER nFields, POINTER fields, POINTER types) AS INTEGER ALIAS 2
-
- RETURN(PDXTblCreate(tName, nFlds, flds, typ))
- END FUNC
-
- ' Clear table for records.
- EXTERNAL "PXEngWin.DLL" FUNC PXTblEmpty (POINTER tblName) AS INTEGER
-
- ' Delete table and its family.
- EXTERNAL "PXEngWin.DLL" FUNC PXTblDelete (POINTER tblName) as INTEGER
-
- ' Copy table and its family.
- EXTERNAL "PXEngWin.DLL" FUNC PXTblCopy (POINTER fromName, POINTER toName) AS INTEGER
-
- ' Rrename table and its family.
- EXTERNAL "PXEngWin.DLL" FUNC PXTblRename (POINTER fromName, POINTER toName) AS INTEGER
-
- ' Add records from one table to another table.
- EXTERNAL "PXEngWin.DLL" FUNC PXTblAdd (POINTER srcName, POINTER destName) AS INTEGER
-
-
- ' RECORD FUNCTIONS.
-
- ' Insert record buffer in database (as last record if Heap).
- EXTERNAL "PXEngWin.DLL" FUNC PXRecAppend (WORD tblHandle, WORD recHandle) AS INTEGER
-
- ' Insert record buffer in database (before current if Heap).
- EXTERNAL "PXEngWin.DLL" FUNC PXRecInsert (WORD tblHandle, WORD recHandle) AS INTEGER
-
- ' Updates current record in database with contents of the record buffer.
- EXTERNAL "PXEngWin.DLL" FUNC PXRecUpdate (WORD tblHandle, WORD recHandle) AS INTEGER
-
- ' Delete current record in table.
- EXTERNAL "PXEngWin.DLL" FUNC PXRecDelete (WORD tblHandle) AS INTEGER
-
- ' Creates a record buffer for a table.
- EXTERNAL "PXEngWin.DLL" FUNC PXRecBufOpen (WORD tblHandle, POINTER precHandle) AS INTEGER
-
- ' Deletes a record buffer for a table.
- EXTERNAL "PXEngWin.DLL" FUNC PXRecBufClose (WORD recHandle) AS INTEGER
-
- ' Clears the record buffer (to blanks).
- EXTERNAL "PXEngWin.DLL" FUNC PXRecBufEmpty (WORD recHandle) AS INTEGER
-
- ' Copy record from a record buffer to another (compatible) record buffer.
- EXTERNAL "PXEngWin.DLL" FUNC PXRecBufCopy (WORD fromHandle, WORD toHandle) AS INTEGER
-
- ' Gets the current record from the database into the record buffer.
- EXTERNAL "PXEngWin.DLL" FUNC PXRecGet (WORD tblHandle, WORD recHandle) AS INTEGER
-
-
- ' FIELD FUNCTIONS.
-
- ' Put short value into N/$/S field in record buffer.
- EXTERNAL "PXEngWin.DLL" FUNC PXPutShort (WORD recHandle, WORD fldHandle, INTEGER value) AS INTEGER
-
- ' Put double value into N/$/S field in record buffer.
- EXTERNAL "PXEngWin.DLL" FUNC PXPutDoub (WORD recHandle, WORD fldHandle, REAL value) AS INTEGER
-
- ' Put long value into N/$/S field in record buffer.
- EXTERNAL "PXEngWin.DLL" FUNC PXPutLong (WORD recHandle, WORD fldHandle, LONG value) AS INTEGER
-
- ' Put string into Alpha field in record buffer.
- EXTERNAL "PXEngWin.DLL" FUNC PXPutAlpha (WORD recHandle, WORD fldHandle, POINTER value) AS INTEGER
-
- ' Put long value into date field (encoded value) in record buffer.
- EXTERNAL "PXEngWin.DLL" FUNC PXPutDate (WORD recHandle, WORD fldHandle, LONG value) AS INTEGER
-
- ' Put blank value into field in record buffer.
- EXTERNAL "PXEngWin.DLL" FUNC PXPutBlank (WORD recHandle, WORD fldHandle) AS INTEGER
-
- ' Get value from N/$/S field in record buffer, into short.
- EXTERNAL "PXEngWin.DLL" FUNC PXGetShort (WORD recHandle, WORD fldHandle, POINTER SValue) AS INTEGER
-
- ' Get value from N/$/S field in record buffer, into double.
- EXTERNAL "PXEngWin.DLL" FUNC PXGetDoub (WORD recHandle, WORD fldHandle, POINTER DValue) AS INTEGER
-
- ' Get value from N/$/S field in record buffer, into long.
- EXTERNAL "PXEngWin.DLL" FUNC PXGetLong (WORD recHandle, WORD fldHandle, POINTER LValue) AS INTEGER
-
- ' Get string from alpha field in record buffer.
- EXTERNAL "PXEngWin.DLL" FUNC PXGetAlpha (WORD recHandle, WORD fldHandle, INTEGER bufSize, POINTER dest) AS INTEGER
-
- ' Get value from date field in record buffer, into long (encoded value).
- EXTERNAL "PXEngWin.DLL" FUNC PXGetDate (WORD recHandle, WORD fldHandle, POINTER Date) AS INTEGER
-
- ' Is value in specified field in record buffer a blank?
- EXTERNAL "PXEngWin.DLL" FUNC PXFldBlank (WORD recHandle, WORD fldHandle, POINTER Blank) AS INTEGER
-
- ' Move to record with specified record number.
- EXTERNAL "PXEngWin.DLL" FUNC PXRecGoto (WORD tblHandle, LONG recNum) AS INTEGER
-
- ' Move to first record in table.
- EXTERNAL "PXEngWin.DLL" FUNC PXRecFirst (WORD tblHandle) AS INTEGER
-
- ' Move to last record in table.
- EXTERNAL "PXEngWin.DLL" FUNC PXRecLast (WORD tblHandle) AS INTEGER
-
- ' Move to next record in table.
- EXTERNAL "PXEngWin.DLL" FUNC PXRecNext (WORD tblHandle) AS INTEGER
-
- ' Move to previous record in table.
- EXTERNAL "PXEngWin.DLL" FUNC PXRecPrev (WORD tblHandle) AS INTEGER
-
-
- ' INDEX FUNCTIONS.
-
- ' Add a primary or secondary (maintained/nonmaintained) index .
- EXTERNAL "PXEngWin.DLL" FUNC PXKeyAdd (WORD tblName, INTEGER nFlds, POINTER pfldHandles, INTEGER mode) AS INTEGER
-
- ' Delete an index for a table (primary/secondary).
- EXTERNAL "PXEngWin.DLL" FUNC PXKeyDrop (WORD tblName, INTEGER indexID) AS INTEGER
-
-
- ' DATE FUNCTIONS.
-
- ' Decodes a date value stored in the Paradox format.
- EXTERNAL "PXEngWin.DLL" FUNC PXDateDecode (LONG date, POINTER mo, POINTER da, POINTER yr) AS INTEGER
-
- ' Encodes a date value to a long value in Paradox format.
- EXTERNAL "PXEngWin.DLL" FUNC PXDateEncode (INTEGER mo, INTEGER da, INTEGER yr, POINTER pdate) AS INTEGER
-
-
- ' SEARCH FUNCTIONS.
-
- ' Searches a table for a given (sub) key.
- EXTERNAL "PXEngWin.DLL" FUNC PXSrchKey (WORD tblHandle, WORD recHandle, INTEGER nFlds, INTEGER mode) AS INTEGER
-
- EXTERNAL "PXEngWin.DLL" FUNC PXSrchFld (WORD tblHandle, WORD recHandle, WORD fldHandle, INTEGER mode) AS INTEGER
-
-
- ' PASSWORD FUNCTIONS.
-
- ' Checks if table is encrypted.
- EXTERNAL "PXEngWin.DLL" FUNC PXTblProtected (WORD tblName, POINTER Protected) AS INTEGER
-
- ' Enters a password to the Engine.
- EXTERNAL "PXEngWin.DLL" FUNC PXPswAdd (POINTER password) AS INTEGER
-
- ' Deletes a password previously entered.
- EXTERNAL "PXEngWin.DLL" FUNC PXPswDel (POINTER password) AS INTEGER
-
- ' Encrypt a table and make it password protected.
- EXTERNAL "PXEngWin.DLL" FUNC PXTblEncrypt (WORD tblName, POINTER password) AS INTEGER
-
- ' Decrypt a table, password must already have been entered.
- EXTERNAL "PXEngWin.DLL" FUNC PXTblDecrypt (WORD tblName) AS INTEGER
-
-
- ' INFORMATIONAL FUNCTIONS.
-
- ' Checks if table exists.
- EXTERNAL "PXEngWin.DLL" FUNC PXTblExist (POINTER tblName, POINTER Exist) AS INTEGER
-
- ' Returns table name corresponding to a table handle.
- EXTERNAL "PXEngWin.DLL" FUNC PXTblName (POINTER tblName, INTEGER bufSize, POINTER tblName) AS INTEGER
-
- ' Returns record number of current record in table.
- EXTERNAL "PXEngWin.DLL" FUNC PXRecNum (WORD tblHandle, POINTER precnum) AS INTEGER
-
- ' Returns number of records in table.
- EXTERNAL "PXEngWin.DLL" FUNC PXTblNRecs (WORD tblHandle, POINTER pnRecs) AS INTEGER
-
- ' Returns number of fields in a record.
- EXTERNAL "PXEngWin.DLL" FUNC PXRecNFlds (WORD tblHandle, POINTER nFlds) AS INTEGER
-
- ' Return number of fields in key for table.
- EXTERNAL "PXEngWin.DLL" FUNC PXKeyNFlds (WORD tblHandle, POINTER nKeyFlds) AS INTEGER
-
- ' Returns field number of a given field name in a table.
- EXTERNAL "PXEngWin.DLL" FUNC PXFldHandle (WORD tblHandle, POINTER fieldName, POINTER pfldHandle) AS INTEGER
-
- ' Returns field type of a given field in a table.
- EXTERNAL "PXEngWin.DLL" FUNC PXFldType (WORD tblHandle, WORD fldHandle, INTEGER bufSize, POINTER fldType) AS INTEGER
-
- ' Returns field name of a given field in a table.
- EXTERNAL "PXEngWin.DLL" FUNC PXFldName (WORD tblHandle, WORD fldHandle, INTEGER bufSize, POINTER fldName) AS INTEGER
-
-
- ' MISCELLANEOUS FUNCTIONS.
- ' Sets maximum size of tables created with PXTblCreat().
- EXTERNAL "PXEngWin.DLL" FUNC PXTblMaxSize (INTEGER maxSize) AS INTEGER
-
- ' Saves all buffered changes to disk.
- EXTERNAL "PXEngWin.DLL" FUNC PXSave() AS INTEGER
-
-
- ' CONCURRENCY FUNCTIONS.
- ' Can be used only if PXWinInit() was successful.
-
- ' Returns name of user as known on network.
- EXTERNAL "PXEngWin.DLL" FUNC PXNetUserName (INTEGER bufSize, POINTER userName) AS INTEGER
-
- ' Locks a file with specified lock (general function).
- EXTERNAL "PXEngWin.DLL" FUNC PXNetFileLock (POINTER fileName, INTEGER lockType) AS INTEGER
-
- ' Unlocks a file with specified lock (general function).
- EXTERNAL "PXEngWin.DLL" FUNC PXNetFileUnlock (POINTER fileName, INTEGER lockType) AS INTEGER
-
- ' Locks an open table with specified lock.
- EXTERNAL "PXEngWin.DLL" FUNC PXNetTblLock (WORD tblHandle, INTEGER lockType) AS INTEGER
-
- ' Unlocks an open table with specified lock.
- EXTERNAL "PXEngWin.DLL" FUNC PXNetTblUnlock (WORD tblHandle, INTEGER lockType) AS INTEGER
-
- ' Locks the current record in a table.
- EXTERNAL "PXEngWin.DLL" FUNC PXNetRecLock (WORD tblHandle, POINTER plckHandle) AS INTEGER
-
- ' Unlocks record associated with lock handle in the table.
- EXTERNAL "PXEngWin.DLL" FUNC PXNetRecUnlock (WORD tblHandle, POINTER lckHandle) AS INTEGER
-
- ' Checks if current record in table is locked (by any user).
- EXTERNAL "PXEngWin.DLL" FUNC PXNetRecLocked (WORD tblHandle, POINTER Locked) AS INTEGER
-
- ' Moves to the record in the table associated with the lock handle.
- EXTERNAL "PXEngWin.DLL" FUNC PXNetRecGotoLock (WORD tblHandle, POINTER lckHandle) AS INTEGER
-
- ' Checks if table was changed by other user since last refresh.
- EXTERNAL "PXEngWin.DLL" FUNC PXNetTblChanged (WORD tblHandle, POINTER Changed) AS INTEGER
-
- ' Forces a refresh of a table if it was changed by another user.
- EXTERNAL "PXEngWin.DLL" FUNC PXNetTblRefresh (WORD tblHandle) AS INTEGER
-
-
- ' ERROR FUNCTIONS.
-
- ' Returns error text associated with the error number.
- EXTERNAL "PXEngWin.DLL" FUNC PXErrMsg (INTEGER errCode) AS STRUCTURE 255
-
- ' Returns name of user causing a locking error.
- EXTERNAL "PXEngWin.DLL" FUNC PXNetErrUser (INTEGER bufSize, POINTER userName) AS INTEGER
-
-
- RUN "DB\PXEngin2" ' Load in the high-level interface library.
-