CONTENTS Title Page Copyright Page Send Us Your Comments Preface 1 Overview 1.1 How RdbAccess for Custom Drivers Works 1.2 RdbAccess for Custom Drivers Environment 1.2.1 Applications 1.2.2 SQL 1.2.3 Rdb/Dispatch 1.2.4 Data Dictionary 1.3 RdbAccess for Custom Drivers Components 1.3.1 Non-SQL Data Server 1.3.2 Data Driver 1.3.3 Metadata Driver 1.3.4 Sample Drivers 2 The Metadata Driver Interface (MDI) 2.1 Overview of the Metadata Driver Interface 2.1.1 Types of Metadata Objects 2.1.2 Properties of Metadata Objects 2.1.3 Describing Fields and Field Metadata 2.1.4 MDI Functions and Callbacks 2.1.5 Requesting Metadata 2.1.6 Providing Metadata for Global Fields 2.1.7 Calling a Metadata Driver 2.1.8 Using Multiple Metadata Drivers 2.2 Required Metadata Driver Attributes 2.2.1 Supported Data Types 2.3 Metadata Driver Data Structures 2.3.1 MDI Function Vectors 2.4 MDI Protocol Numbers 3 Creating and Using Metadata Drivers 3.1 Sources of Metadata 3.2 Sample Metadata Driver Modules 3.3 Creating the Sample Metadata Driver 3.4 Using the Sample Metadata Driver 4 MDI Function Definitions MDI_ATTACH_DICTIONARY MDI_DETACH_DICTIONARY MDI_FETCH_FIELDS MDI_FETCH_DICTIONARY_RELATIONS MDI_FETCH_DICTIONARY_VIEWS MDI_FETCH_RELATION_FIELDS MDI_FETCH_VIEW_FIELDS MDI_FETCH_VIEW_RELATIONS NSDS$MDI_INI 4.1 MDI Callback Definitions Field Callback Function Field Information Callback Function Relation Callback Function View Callback Function 5 The Data Driver Interface (DDI) 5.1 Overview of the Data Driver Interface 5.1.1 Principles 5.1.1.1 Terminology 5.1.1.2 Database Keys 5.1.1.3 Use of Callback Functions 5.1.2 Data Driver Functions 5.2 Semantics of DDI Functions 5.2.1 Usage of DDI Functions 5.2.2 Data Selection 5.2.3 Access Paths 5.2.4 Scope of Validity of Dbkeys 5.2.5 Transaction Boundaries 5.2.6 Use of Database Keys 5.2.7 Accessing Data Sources 5.2.8 Accessing Relations 5.2.9 Using Multiple Data Drivers 5.2.10 How NSDS Calls a Data Driver 5.3 Data Driver Data Structures 5.3.1 DDI Access Paths 5.3.2 DDI Function Vectors 5.4 DDI Protocol Numbers 6 Creating and Using Data Drivers 6.1 Sample Data Driver Modules 6.1.1 Enabling the Relation Capability Mask 6.2 Creating the Sample RMS Data Driver 6.3 Using the Sample RMS Data Driver 7 DDI Function Definitions DDI_ALLOCATE_METADATA_MEM DDI_ATTACH_DATABASE DDI_CLOSE_DATA_RELATION DDI_COMMIT_TRANSACTION DDI_DELETE_DATA DDI_DETACH_DATABASE DDI_GET_ALL_DATA DDI_GET_DATA_BY_DBKEY DDI_GET_DBKEY_LENGTH DDI_GET_NEXT_TUPLE NSDS$DDI_INI DDI_INSERT_DATA DDI_OPEN_DATA_RELATION DDI_QUERY_RELATION DDI_RECEIVE_METADATA_INFO DDI_ROLLBACK_TRANSACTION DDI_SET_ACCESS_PATH DDI_SET_DATA_SELECTION DDI_START_TRANSACTION DDI_UPDATE_DATA 7.1 DDI Callback Functions DDI Access Path Callback Function DDI Data Callback Function DDI Selection Evaluation Callback 8 Driver Error Status Callback Function 8.1 Overview of the Driver Error Callback Function 8.2 Use of the Driver Error Callback Function Driver Error Callback Function 9 Troubleshooting Problems When Creating and Using Metadata and Data Drivers 9.1 Overview of Troubleshooting Problems with Metadata and Data Drivers 9.2 Troubleshooting Tools 9.2.1 Using the NSDS$DEBUG_FLAGS Logical Name 9.2.2 Using the NSDS$SAMPLE_DEBUG_FLAGS Logical Name 9.2.2.1 Diagnostic ``C'' Flag 9.2.2.2 Diagnostic ``E'' Flag 9.2.2.3 Diagnostic ``F'' Flag 9.2.3 How to Debug a Driver Using the V AX/VMS Debugger 9.2.3.1 Debugging Approaches 9.2.3.2 Debugging Metadata and Data Drivers A Driver Functions and Arguments Summary A.1 Functions and Arguments for Metadata Drivers A.2 Functions and Arguments for Data Drivers