' ########################################################################################
' Microsoft Windows
' File: MsJetOleDb.inc
' Copyright (c) 2011 Jos? Roca
' Portions Copyright (c) Microsoft Corporation.
' All Rights Reserved.
' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
' EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
' MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
' ########################################################################################
#IF NOT %DEF(PBX_MsJetOleDb_PBI)
#DEFINE PBX_MsJetOleDb_PBI
%EQUATE `MSJETOLEDB_INC = 1
'// OLE DB Provider
$CLSID_JETOLEDB_3_51 = GUID$("{DEE35060-506B-11CF-B1AA-00AA00B8DE95}")
$CLSID_JETOLEDB_4_00 = GUID$("{DEE35070-506B-11CF-B1AA-00AA00B8DE95}")
'// Jet OLEDB Provider-Specific GUIDs
$DBSCHEMA_JETOLEDB_REPLPARTIALFILTERLIST = GUID$("{E2082DF0-54AC-11D1-BDBB-00C04FB92675}")
$DBSCHEMA_JETOLEDB_REPLCONFLICTTABLES = GUID$("{E2082DF2-54AC-11D1-BDBB-00C04FB92675}")
$DBSCHEMA_JETOLEDB_USERROSTER = GUID$("{947BB102-5D43-11D1-BDBF-00C04FB92675}")
$DBSCHEMA_JETOLEDB_ISAMSTATS = GUID$("{8703B612-5D43-11D1-BDBF-00C04FB92675}")
'// Jet(Access)-Specific Security Objects
$DBOBJECT_JETOLEDB_FORMS = GUID$("{C49C842E-9DCB-11D1-9F0A-00C04FC2C2E0}")
$DBOBJECT_JETOLEDB_SCRIPTS = GUID$("{C49C842F-9DCB-11D1-9F0A-00C04FC2C2E0}")
$DBOBJECT_JETOLEDB_REPORTS = GUID$("{C49C8430-9DCB-11D1-9F0A-00C04FC2C2E0}")
$DBOBJECT_JETOLEDB_MODULES = GUID$("{C49C8432-9DCB-11D1-9F0A-00C04FC2C2E0}")
'// Private Property Set Descriptions
$DBPROPSET_JETOLEDB_ROWSET = GUID$("{A69DE420-0025-11D0-BC9C-00C04FD705C2}")
$DBPROPSET_JETOLEDB_SESSION = GUID$("{B20F6C12-9B2A-11D0-9EBD-00C04FC2C2E0}")
$DBPROPSET_JETOLEDB_DBINIT = GUID$("{82CF8156-9B40-11D0-9EBD-00C04FC2C2E0}")
$DBPROPSET_JETOLEDB_TABLE = GUID$("{E64CC5FC-9FF2-11D0-9EBD-00C04FC2C2E0}")
$DBPROPSET_JETOLEDB_COLUMN = GUID$("{820BF922-6AC8-11D1-9F02-00C04FC2C2E0}")
$DBPROPSET_JETOLEDB_TRUSTEE = GUID$("{C9E19286-9B4A-11D1-9F0A-00C04FC2C2E0}")
'// PROPIDs for DBPROPSET_JETOLEDB_ROWSET:
%EQUATE `DBPROP_JETOLEDB_ODBCPASSTHROUGH = &HFD ' // Is this query a pass-through query
%EQUATE `DBPROP_JETOLEDB_ODBCPASSTHROUGHCONNECTSTRING = &HF2 ' // Jet Connect String for pass-through query
%EQUATE `DBPROP_JETOLEDB_BULKPARTIAL = &HEF ' // Allow partial bulk operations
%EQUATE `DBPROP_JETOLEDB_ENABLEFATCURSOR = &HEE ' // Enable "fat cursor" caching
%EQUATE `DBPROP_JETOLEDB_FATCURSORMAXROWS = &HED ' // # of rows to cache in "fat cursor"
'//%DBPROP_JETOLEDB_3_5_ENABLEIRowsetIndex = &H101 ' // 3.5 ONLY - enable IRowsetIndex interface for Seek
%EQUATE `DBPROP_JETOLEDB_STOREDQUERY = &H102 ' // Treat command text as stored query name
%EQUATE `DBPROP_JETOLEDB_VALIDATEONSET = &HEC ' // Check validation rules on SetData (instead of Update)
%EQUATE `DBPROP_JETOLEDB_LOCKGRANULARITY = &H107 ' // Alcatraz Locking Granularity - Row/Page/Default
%EQUATE `DBPROP_JETOLEDB_BULKNOTRANSACTIONS = &H10C ' // Determines if DML bulk operations are transacted
%EQUATE `DBPROP_JETOLEDB_INCONSISTENT = &H117 ' // Equivalent to DAO's dbInconsistent
%EQUATE `DBPROP_JETOLEDB_PASSTHROUGHBULKOP = &H119 ' // Equivalent to DAO's ReturnsRecords (inversed)
'// DBPROPSET_JETOLEDB_ROWSET DBPROP_JETOLEDB_LOCKGRANULARITY Enumeration Values
%EQUATE `DBPROPVAL_LG_PAGE = &H01 ' // Page Locking
%EQUATE `DBPROPVAL_LG_ALCATRAZ = &H02 ' // Alcatraz Row Locking
%EQUATE `DBPROP_JETOLEDB_RECYCLELONGVALUEPAGES = &HF9 ' // Whether the Jet engine should aggressively reclaim freed after use in BLOBs
%EQUATE `DBPROP_JETOLEDB_RECYCLELONGVALUEPAGES = &HF9 ' // Whether the Jet engine should aggressively reclaim freed after use in BLOBs
%EQUATE `DBPROP_JETOLEDB_PAGETIMEOUT = &HEB
%EQUATE `DBPROP_JETOLEDB_SHAREDASYNCDELAY = &HEA
%EQUATE `DBPROP_JETOLEDB_EXCLUSIVEASYNCDELAY = &HE9
%EQUATE `DBPROP_JETOLEDB_LOCKRETRY = &HE8
%EQUATE `DBPROP_JETOLEDB_USERCOMMITSYNC = &HE7
%EQUATE `DBPROP_JETOLEDB_MAXBUFFERSIZE = &HE6
%EQUATE `DBPROP_JETOLEDB_LOCKDELAY = &HE5
%EQUATE `DBPROP_JETOLEDB_FLUSHTRANSACTIONTIMEOUT = &HE4
%EQUATE `DBPROP_JETOLEDB_IMPLICITCOMMITSYNC = &HE3
%EQUATE `DBPROP_JETOLEDB_MAXLOCKSPERFILE = &HE2
%EQUATE `DBPROP_JETOLEDB_ODBCCOMMANDTIMEOUT = &HDB
%EQUATE `DBPROP_JETOLEDB_RESETISAMSTATS = &H104 ' // Determines if the ISAMSTATS schema resets after it returns stats
%EQUATE `DBPROP_JETOLEDB_CONNECTIONCONTROL = &H108 ' // Passive Shutdown (to prevent others from opening the database)
%EQUATE `DBPROP_JETOLEDB_ODBCPARSE = &H113 ' // ODBC Parsing
%EQUATE `DBPROP_JETOLEDB_PAGELOCKSTOTABLELOCK = &H114 ' // # of pages locked in a transaction before jet tries to promote to excl. table lock
%EQUATE `DBPROP_JETOLEDB_SANDBOX = &H115
%EQUATE `DBPROP_JETOLEDB_TXNCOMMITMODE = &H116 ' // Mode to be used when committing transactions
'// DBPROPSET_JETOLEDB_SESSION DBPROP_JETOLEDB_CONNECTIONCONTROL Enumeration Values
%EQUATE `DBPROPVAL_JCC_PASSIVESHUTDOWN = &H01 ' // prevent others from opening the database
%EQUATE `DBPROPVAL_JCC_NORMAL = &H02 ' // allow others to open the database
'// DBPROPSET_JETOLEDB_SESSION DBPROP_JETOLEDB_TXNCOMMITMODE Enumeration Values
%EQUATE `DBPROPVAL_JETOLEDB_TCM_FLUSH = &H01 ' // Synchronously commit transactions to disk
'// PROPIDs for DBPROPSET_JETOLEDB_DBINIT:
%EQUATE `DBPROP_JETOLEDB_REGPATH = &HFB ' // Path to Jet Registry entries
%EQUATE `DBPROP_JETOLEDB_SYSDBPATH = &HFA ' // Full Path to System Database
%EQUATE `DBPROP_JETOLEDB_DATABASEPASSWORD = &H100 ' // Password for Database
%EQUATE `DBPROP_JETOLEDB_ENGINE = &H103 ' // Enumeration of Jet Engine/ISAM type/version
%EQUATE `DBPROP_JETOLEDB_DATABASELOCKMODE = &H106 ' // Locking Granularity Scheme ("Old"/"Alcatraz" mode)
%EQUATE `DBPROP_JETOLEDB_GLOBALBULKPARTIAL = &H109 ' // Database Default Partial/No Partial Behavior
%EQUATE `DBPROP_JETOLEDB_GLOBALBULKNOTRANSACTIONS = &H10B ' // Determines if DML bulk operations are transacted
%EQUATE `DBPROP_JETOLEDB_NEWDATABASEPASSWORD = &H10D ' // Used to set new database password in IDBDataSourceAdmin::ModifyDataSource
%EQUATE `DBPROP_JETOLEDB_CREATESYSTEMDATABASE = &H10E ' // Used on IDBDataSourceAdmin::CreateDataSource to create a system database
%EQUATE `DBPROP_JETOLEDB_ENCRYPTDATABASE = &H10F ' // Used on CreateDatasource, Compact to determine if new database is encrypted
%EQUATE `DBPROP_JETOLEDB_COMPACT_DONTCOPYLOCALE = &H110 ' // Don't copy per-column locale information to the compact target
%EQUATE `DBPROP_JETOLEDB_COMPACT_NOREPAIRREPLICAS = &H112 ' // Don't try to repair damaged replica databases when compacting
%EQUATE `DBPROP_JETOLEDB_SFP = &H118
%EQUATE `DBPROP_JETOLEDB_COMPACTFREESPACESIZE = &H11A ' // How much free space would be reclaimed if the db were compacted
'// DBPROP_JETOLEDB_GLOBALBULKPARTIAL/DBPROP_JETOLEDB_BULKPARTIAL Enumeration Values
%EQUATE `DBPROPVAL_BP_DEFAULT = &H00 ' // Default (only valid for DBPROP_JETOLEDB_BULKPARTIAL)
%EQUATE `DBPROPVAL_BP_PARTIAL = &H01 ' // Use partial updates (like Access)
%EQUATE `DBPROPVAL_BP_NOPARTIAL = &H02 ' // Use No Partial Behavior (all or nothing)
'// DBPROP_JETOLEDB_GLOBALNOTRANSACTIONS/DBPROP_JETOLEDB_BULKNOTRANSACTIONS Enumeration Values
%EQUATE `DBPROPVAL_BT_DEFAULT = &H00 ' // Default (only valid for DBPROP_JETOLEDB_NOTRANSACTIONS)
%EQUATE `DBPROPVAL_BT_NOBULKTRANSACTIONS = &H01 ' // Don't transact bulk operations
%EQUATE `DBPROPVAL_BT_BULKTRANSACTIONS = &H02 ' // Transact bulk operations
'// DBPROPSET_JETOLEDB_DBINIT DBPROP_JETOLEDB_ENGINE Enumeration Values
%EQUATE `JETDBENGINETYPE_UNKNOWN = &H00 ' // ISAM Type Unknown/ N/A
%EQUATE `JETDBENGINETYPE_JET10 = &H01
%EQUATE `JETDBENGINETYPE_JET11 = &H02
%EQUATE `JETDBENGINETYPE_JET2X = &H03
%EQUATE `JETDBENGINETYPE_JET3X = &H04
%EQUATE `JETDBENGINETYPE_JET4X = &H05
%EQUATE `JETDBENGINETYPE_DBASE3 = &H10
%EQUATE `JETDBENGINETYPE_DBASE4 = &H11
%EQUATE `JETDBENGINETYPE_DBASE5 = &H12
%EQUATE `JETDBENGINETYPE_EXCEL30 = &H20
%EQUATE `JETDBENGINETYPE_EXCEL40 = &H21
%EQUATE `JETDBENGINETYPE_EXCEL50 = &H22
%EQUATE `JETDBENGINETYPE_EXCEL80 = &H23
%EQUATE `JETDBENGINETYPE_EXCEL90 = &H24
%EQUATE `JETDBENGINETYPE_EXCHANGE4 = &H30
%EQUATE `JETDBENGINETYPE_LOTUSWK1 = &H40
%EQUATE `JETDBENGINETYPE_LOTUSWK3 = &H41
%EQUATE `JETDBENGINETYPE_LOTUSWK4 = &H42
%EQUATE `JETDBENGINETYPE_PARADOX3X = &H50
%EQUATE `JETDBENGINETYPE_PARADOX4X = &H51
%EQUATE `JETDBENGINETYPE_PARADOX5X = &H52
%EQUATE `JETDBENGINETYPE_PARADOX7X = &H53
%EQUATE `JETDBENGINETYPE_TEXT1X = &H60
%EQUATE `JETDBENGINETYPE_HTML1X = &H70
' // DBPROPSET_JETOLEDB_DBINIT DBPROP_JETOLEDB_DATABASELOCKMODE Enumeration Values
%EQUATE `DBPROPVAL_DL_OLDMODE = &H00 ' // Original Jet Database Locking Scheme
%EQUATE `DBPROPVAL_DL_ALCATRAZ = &H01 ' // Alcatraz Technology - enables row-level locking
'// PROPIDs for DBPROPSET_JETOLEDB_TABLE:
%EQUATE `DBPROP_JETOLEDB_LINK = &HF7 ' // Is this table really a link?
%EQUATE `DBPROP_JETOLEDB_LINKEXCLUSIVE = &HF6 ' // Should this link be opened exclusively on the remote database
%EQUATE `DBPROP_JETOLEDB_LINKDATASOURCE = &HF5 ' // Remote data source to which to link
%EQUATE `DBPROP_JETOLEDB_LINKPROVIDERSTRING = &HF4 ' // Jet Provider string to be used to connect to the remote data source
%EQUATE `DBPROP_JETOLEDB_LINKREMOTETABLE = &HF3 ' // remote table name of the link
%EQUATE `DBPROP_JETOLEDB_LINKCACHE_AUTHINFO = &HF0 ' // Should authentication information for this link be cached in the database?
%EQUATE `DBPROP_JETOLEDB_VALIDATIONRULE = &HD8 ' // Table Validation Rule
%EQUATE `DBPROP_JETOLEDB_VALIDATIONTEXT = &HD7 ' // Access Text to display when validation rule is not met
%EQUATE `DBPROP_JETOLEDB_HIDDENINACCESS = &H10A ' // Determines if a table shows up as "hidden" in MS Access
'// PROPIDs for DBPROPSET_JETOLEDB_COLUMN:
%EQUATE `DBPROP_JETOLEDB_COL_HYPERLINK = &HE1 ' // Hyperlink flag - use on "LongText" fields only
%EQUATE `DBPROP_JETOLEDB_COL_ALLOWZEROLENGTH = &HE0 ' // Allow Zero Length Strings
%EQUATE `DBPROP_JETOLEDB_COL_COMPRESSED = &HDF ' // Compressed Text Columns (Red 4.x only)
%EQUATE `DBPROP_JETOLEDB_COL_ONELVPERPAGE = &HDE ' // Put more than one BLOB on a page (size allowing)?
%EQUATE `DBPROP_JETOLEDB_COL_AUTOGENERATE = &HDD ' // Autogenerate the value (GUID columns only)
%EQUATE `DBPROP_JETOLEDB_COL_IISAMNOTLAST = &HDC ' // used to tell the IISAM you intend to add more columns after this one
%EQUATE `DBPROP_JETOLEDB_COL_VALIDATIONRULE = &HDA ' // Column validation rule
%EQUATE `DBPROP_JETOLEDB_COL_VALIDATIONTEXT = &HD9 ' // column validation text to display when validation rule is not met
'// PROPIDs for DBPROPSET_COLUMN:
#IF NOT %DEF(%DBPROP_COL_SEED)
%EQUATE `DBPROP_COL_SEED = &H11A&
#ENDIF ' // DBPROP_COL_SEED
#IF NOT %DEF(%DBPROP_COL_INCREMENT)
%EQUATE `DBPROP_COL_INCREMENT = &H11B&
#ENDIF ' // DBPROP_COL_INCREMENT
'// PROPIDs for DBPROPSET_JETOLEDB_TRUSTEE:
%EQUATE `DBPROP_JETOLEDB_TRUSTEE_PIN = &H105 ' // Jet User pin (Username + Pin --> SID)
#ENDIF
