HP NonStop Open System Services ODBC/MX Client Driver for SQL/MX Release 3.1 Abstract This manual describes how to install and configure the HP NonStop Open System Services (OSS) ODBC/MX Client Driver. This product enables applications developed for the OSS Open Database Connectivity (ODBC) application programming interface to use HP NonStop SQL/MX to access HP NonStop SQL databases on an HP NonStop system. Product Version HP NonStop OSS ODBC/MX 3.
Document History Part Number Product Version Published 640328-001 HP NonStop OSS ODBC/MX 3.0 February 2011 663857-001 HP NonStop OSS ODBC/MX 3.
Legal Notices Copyright 2011 Hewlett-Packard Development Company L.P. Confidential computer software. Valid license from HP required for possession, use or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor's standard commercial license. The information contained herein is subject to change without notice.
HP NonStop Open System Services ODBC/MX Client Driver for SQL/MX Release 3.1 Glossary Index Examples Figures Legal Notices What’s New in This Manual v Manual Information v New and Changed Information About This Manual vii Audience vii Related Documentation vii Notation Conventions xi HP Encourages Your Comments v xii 1.
Contents 2. Configuring Client Data Source Attributes for ODBC/MX Connectivity 2.
Contents Glossary Glossary Index Examples Example A-1. Example A-2. Example A-3. Example for compiling a threaded program A-1 Example for linking a threaded program A-1 Sample ODBC Application Code A-3 Figures Figure 1-1. Figure 1-2. OSS ODBC/MX Client Driver Architecture on NonStop Connection Data Flow 1-5 1-3 Tables Table 1-1. Table 2-1. Table 3-1. Table 3-2. Table 3-3. Table 3-4. Table 3-5. Table 3-6. Table 3-7. Table 3-8. Table 3-9. Table 3-10. Table 3-11. Table 3-12. Table 3-13. Table 3-14.
Contents Table 3-23. Sample Values Retrieved Using a C/C++ Program and Their Corresponding Expected Values in Nanosecond 3-18 HP NonStop Open System Services ODBC/MX Client Driver for SQL/MX Release 3.
What’s New in This Manual Manual Information HP NonStop Open System Services ODBC/MX Client Driver for SQL/MX Release 3.1 Abstract This manual describes how to install and configure the HP NonStop Open System Services (OSS) ODBC/MX Client Driver. This product enables applications developed for the OSS Open Database Connectivity (ODBC) application programming interface to use HP NonStop SQL/MX to access HP NonStop SQL databases on an HP NonStop system. Product Version HP NonStop OSS ODBC/MX 3.
What’s New in This Manual New and Changed Information Limitations of OSS ODBC/MX Client Driver on page 1-13 Updated the description of Configuring Data Sources on page 2-2. Updated the description of TraceFile on page 2-3. Updated the description of TraceFlags on page 2-4. Updated the syntax of the domain name on page 2-5. Added new data source description, SQLFractionValue on page 2-5.
About This Manual Audience ODBC application programmers who write 32-bit applications to access an NonStop SQL database. Other end users or application programmers who use ODBC/MX to access a NonStop SQL database. Related Documentation The SQL/MX library of manuals, which includes: Introductory Guides SQL/MX Comparison Guide for SQL/MP Users Describes SQL differences between SQL/MP and SQL/MX. SQL/MX Quick Start Describes basic techniques for using SQL in the SQL/MX conversational interface (MXCI).
About This Manual Related Documentation Specialized Guides SQL/MX Installation and Management Guide Describes how to plan for, install, create, and manage an SQL/MX database. Explains how to use installation and management commands and utilities. SQL/MX Query Guide Describes how to understand query execution plans and write optimal queries for an SQL/MX database. SQL/MX Data Mining Guide Describes the SQL/MX data structures and operations to carry out the knowledge-discovery process.
About This Manual Related Documentation mentioned under the SQL/MX Online Help and Sample Programs document. This document can be accessed from the following documentation links available at the HP Business Support Center (BSC), http://www.hp.com/go/nonstop-docs: HP Integrity NonStop H-Series HP Integrity NonStop J-Series For more information about downloading online help, see the SQL/MX Installation and Management Guide.
About This Manual Related Documentation Programming Manuals Introductory Guides SQL/MX Comparison Guide for SQL/MP Users SQL/MX Programming Manual for C and COBOL SQL/MX Quick Start SQL/MX Programming Manual for Java SQL/MX Guide to Stored Procedures in Java Reference Manuals SQL/MX Reference Manual SQL/MX Messages Manual SQL/MX Glossary SQL/MX Queuing and Publish/ Subscribe Services SQL/MX Query Guide SQL/MX Report Writer Guide DataLoader/MX Reference Manual SQL/MX Online Help Specialized
About This Manual Notation Conventions Notation Conventions Hypertext Links Blue underline is used to indicate a hypertext link within text. By clicking a passage of text with a blue underline, you are taken to the location described. For example: This requirement is described under Backup DAM Volumes and Physical Disk Drives on page 3-2. General Syntax Notation This list summarizes the notation conventions for syntax presentation in this manual. UPPERCASE LETTERS.
About This Manual Change Bar Notation Nonitalic text. Nonitalic letters, numbers, and punctuation indicate text that is displayed or returned exactly as shown. For example: Backup Up. The CRE has many new message types and some new message type codes for old message types. In the CRE, the message type SYSTEM includes all messages except LOGICAL-CLOSE and LOGICAL-OPEN. Change Bar Notation Change bars are used to indicate substantive differences between this manual and its preceding version.
1 ODBC/MX Client Overview This chapter includes these sections: Client Components Data Sources OSS ODBC/MX Client Driver Architecture Connections Object Naming and Mapping Release Considerations and Restrictions Traces Supported APIs Unsupported ODBC API Functions and Data Types OSS ODBC/MX Client Driver Features Limitations of OSS ODBC/MX Client Driver Applications developed for the OSS Open Database Connectivity (ODBC) application programming interface (API) access a NonStop SQL
ODBC/MX Client Overview Data Source Configuration NSM/web or MXCI in MXCS mode (MACL), but you cannot delete it. The TDM_Default_DataSource has these functions: ODBC clients can connect to TDM_Default_DataSource and access a NonStop SQL database with no special configuration required.
ODBC/MX Client Overview OSS ODBC/MX Client Driver Architecture Figure 1-1 shows the architecture of OSS ODBC/MX Client Driver. Figure 1-1.
ODBC/MX Client Overview Connections Meanwhile, the OSS ODBC/MX Client Driver waits for the reply from the Association Server. The following scenarios describe what steps the Association Server perform depending on configuration and status of the data source. If the data source is configured and is in a running state, the Association Server replies to the OSS ODBC/MX Client Driver after authenticating the client driver credentials.
ODBC/MX Client Overview Connecting a Client to a Data Source requested data source name, it assigns a server associated with the default data source. 3. The ODBC client application sends a connection request to the MXCS server, which is assigned by the Association Server. If the user information is not valid, the connection is rejected. 4.
ODBC/MX Client Overview Connection Mapping Connection Mapping MXCS maps the client data source name in an incoming connection request to the server data source name (names are case sensitive). If the name matches but the server data source is not started, the connection request is rejected. If the server data source name does not exist, the Association Server routes the connection to the default data source. If the default data source is not started, the connection request is rejected.
ODBC/MX Client Overview Release Considerations and Restrictions registered in different NonStop SQL user catalogs, using the same SQL/MX catalog and schema names. Release Considerations and Restrictions Table 1-1. Release Considerations and Restrictions (page 1 of 2) ODBC/MX client software An ODBC/MX client must be installed on a NonStop system. Catalog and schema An ODBC client application can set the catalog and schema information in the ODBCDSN file.
ODBC/MX Client Overview Release Considerations and Restrictions Table 1-1. Release Considerations and Restrictions (page 2 of 2) SQLPrimaryKeys Function This function does not support pattern value arguments for table names, and returns keys information for a specified table name in the SQL/MX catalog.
ODBC/MX Client Overview Traces For information on migrating NonStop ODBC Server client applications to an ODBC/MX environment, see SQL/MX Comparison Guide for NonStop SQL/MP Users. Traces The OSS ODBC/MX Client Driver supports tracing facility. The trace information is captured in an OSS log file. Tracing can be enabled or disabled through the ODBCDSN file. For information on configuring client data source traces, see Tracing OSS ODBC/MX Client Driver on page 2-8.
ODBC/MX Client Overview Supported APIs Supported APIs This release of OSS ODBC/MX Client Driver supports the following ODBC API functions. Diagnostic Environment Connection Descriptor Statement Attribute Results Catalog Unsupported ODBC API Functions and Data Types API Functions OSS ODBC/MX Client Driver 3.x does not support the following ODBC API functions. For descriptions of the ODBC API functions, see ODBC API Functions on page 3-2.
ODBC/MX Client Overview Data Types SQLGetInstalledDrivers Installer – Driver Manager SQLRemoveDriverManager SQLInstallDriverManager Installer – File DSN SQLReadFileDSN SQLWriteFileDSN Installer – Installer Errors SQLInstallerError SQLPostInstallerError Installer – Profile Strings SQLWritePrivateProfileString SQLGetPrivateProfileString Installer – Translator SQLInstallTranslator SQLInstallTranslatorEx SQLRemoveTranslator SQLGetTranslator Instal
ODBC/MX Client Overview Unsupported Functionalities Unsupported Functionalities The OSS ODBC/MX Client Driver does not support the following functionalities: Windows-specific APIs that are used for driver installation and driver configuration. Dynamic DLL loading while loading OSS ODBC/MX Client Driver, other ODBC Drivers to external data sources (for example, Oracle or SQLServer). Wide character support. Windows-styled exception handling. Asynchronous semantics.
ODBC/MX Client Overview Limitations of OSS ODBC/MX Client Driver Limitations of OSS ODBC/MX Client Driver The system running an R 3.x version of NonStop OSS ODBC/MX Driver does not connect to a NonStop system running an R 2.x version of ODBC/MX server objects. When you try to connect an R 3.x version of NonStop OSS ODBC/MX Driver to an R 2.x version of ODBC/MX server objects, the behavior is unpredictable. HP NonStop Open System Services ODBC/MX Client Driver for SQL/MX Release 3.
ODBC/MX Client Overview Limitations of OSS ODBC/MX Client Driver HP NonStop Open System Services ODBC/MX Client Driver for SQL/MX Release 3.
2 Configuring Client Data Source Attributes for ODBC/MX Connectivity This chapter includes these sections: Accessing the ODBC/MX Data Source Configuring Data Sources Adding New Data Sources Modifying Data Sources Removing Data Sources Tracing OSS ODBC/MX Client Driver Components of the MX Connectivity Service Migration Considerations Accessing the ODBCDSN file through environment variable Use the MXCS configuration to add, configure, and remove ODBC/MX data sources.
Configuring Client Data Source Attributes for ODBC/MX Connectivity Configuring Data Sources Configuring Data Sources The ODBCDSN file contains all the data sources and their configuration details. The ODBCDSN file is an edit file and all the configuration details are maintained as a set of predefined attributes or parameters. The file can be located in the local directory of the application program, or alternatively one system definition can be located in the system default location $SYSTEM.SYSTEM.
Configuring Client Data Source Attributes for ODBC/MX Connectivity ODBCDSN File Format ODBCDSN File Format Table 2-1 describes the format of the ODBCDSN file. Table 2-1.
Configuring Client Data Source Attributes for ODBC/MX Connectivity ODBCDSN File Format Table 2-1. Format of the ODBCDSN file (page 2 of 4) File Section Contents and Format TraceFlags Bitmask indicating trace level. For ODBC/MX 3.x: If TraceFlags keyword is omitted, TraceFlags = 0 TraceFlags can take the following values: [ODBC Data Sources] [data-source-name] ERROR—Indicates some failed SQL calls and communication problems.
Configuring Client Data Source Attributes for ODBC/MX Connectivity ODBCDSN File Format Table 2-1.
Configuring Client Data Source Attributes for ODBC/MX Connectivity ODBCDSN File Format Table 2-1. Format of the ODBCDSN file (page 4 of 4) File Section Contents and Format SCHEMA [DataSourceName] Name of the schema to be used. If not specified, the value is taken from those defined by the ODBC/MX service. List of drivers. Currently, only one driver can be used.
Configuring Client Data Source Attributes for ODBC/MX Connectivity Example ODBCDSN file Example ODBCDSN file The following example shows an ODBCDSN file that defines connections to three client data sources, TDM_Default_DataSource, DS1, and DS2. In this example, the attributes Catalog and Schema for data source DS1 are defined as DS1CAT and DS1SCH. [ODBC] TraceFlags TraceStart TraceFile = 6 = 0 = trlog [ODBC Data Sources] TDM_Default_DataSource = NonStop ODBC/MX 3.x DS1 = NonStop ODBC/MX 3.
Configuring Client Data Source Attributes for ODBC/MX Connectivity Adding New Data Sources Adding New Data Sources To add a new data source entry in the ODBCDSN file, include the data source name and its description. If the values of the parameters are not specified in the ODBCDSN file, the OSS ODBC/MX Client Driver uses default values when creating a connection. Modifying Data Sources To modify a data source entry, complete the following steps: 1. Modify the ODBCDSN file. 2.
Configuring Client Data Source Attributes for ODBC/MX Connectivity Enabling Tracing for OSS ODBC/MX Client Driver ERROR—Indicates some failed SQL calls and communication problems. WARNING—Triggered by anything that generates a diagnostic record. CONFIG—Provides details of configuration calls. INFO—Provides details of what calls are made and other important markers. DEBUG (or number 6)—Shows the detailed contents of many calls. TraceFile parameter indicates the name of the trace file.
Configuring Client Data Source Attributes for ODBC/MX Connectivity Accessing the ODBCDSN file through environment variable Accessing the ODBCDSN file through environment variable You can specify the path from where the driver retrieves the ODBCDSN configuration file by exporting an environment variable, DSN_PATH. The DSN_PATH variable must contain the path of the file.The file name must be excluded from the specified path.
3 ODBC/MX Conformance This chapter contains tables that describe the ODBC/MX conformance to standard ODBC API functions and SQL conformance levels.
ODBC/MX Conformance ODBC API Functions ODBC API Functions ODBC/MX conforms with the ODBC interface core level. The following tables show the ODBC/MX support for each ODBC API function. The column headed ODBC Version lists the version of the Microsoft ODBC standard in which a function was first introduced. For example, if ODBC Version 1.0 is listed as supported, then the feature was first defined in version 1.0 of the Microsoft ODBC standard and ODBC/MX currently supports the functions.
ODBC/MX Conformance ODBC API Functions Table 3-3. Setting and Retrieving Driver Attributes ODBC Version Supported by ODBC/MX SQLSetConnectAttr 3.x Yes Sets a connection attribute. SQLGetConnectAttr 3.x Yes Returns the value of a connection attribute. SQLSetEnvAttr 3.x Yes Sets an environment attribute. SQLGetEnvAttr 3.x Yes Returns the value of an environment attribute. SQLSetStmtAttr 3.x Yes Sets a statement attribute.
ODBC/MX Conformance ODBC API Functions Table 3-6. Submitting SQL Requests ODBC Version Supported by ODBC/MX SQLExecute 1.0 Yes Executes a prepared statement. SQLExecDirect 1.0 Yes Executes a statement. SQLNativeSql 1.0 Yes Returns the text of an SQL statement as translated by the driver. SQLDescribeParam 1.0 Yes Returns the description for a specific parameter in a statement. SQLNumParams 1.0 Yes Returns the number of parameters in a statement. SQLParamData 1.
ODBC/MX Conformance ODBC API Functions Table 3-7. Retrieving Results and Information About Results (page 2 of 2) ODBC Version Supported by ODBC/MX SQLExtendedFetch 1.0 Yes Fetches the specified rowset of data from the result set and returns data for all bound columns. No bookmarks are supported. SQLSetPos 1.0 Yes Positions a cursor within a fetched block of data and allows an application to refresh data in the row set or to update or delete data in the result set. SQLMoreResults 1.
ODBC/MX Conformance ODBC API Functions Table 3-8. Obtaining Information About a Data Source’s System Tables (page 2 of 2) ODBC Version Supported by ODBC/MX SQLProcedures 1.0 Yes Returns the list of procedure names stored in a specific data source. SQLSpecialColumns 1.0 Yes Returns information about the optimal set of columns that uniquely identifies a row in a specified table or the columns that are automatically updated when any value in the row is updated by a transaction. SQLStatistics 1.
ODBC/MX Conformance SQL Conformance Level Table 3-10. Terminating a Connection ODBC Version Supported by ODBC/MX Description and Notes SQLDisconnect 1.0 Yes Closes the connection. SQLFreeHandle 3.x Yes Releases an environment, connection, statement, or descriptor handle. Function SQL Conformance Level ODBC/MX conforms to the SQL language entry level of SQL-92.
ODBC/MX Conformance SQL Scalar Functions Table 3-11. Numeric Functions (page 2 of 2) ODBC Function SQL/MX Equivalent Function PI PI POWER POWER RADIANS RADIANS RAND RAND ROUND Not supported in this release. SIGN SIGN SIN SIN SINH SINH SQRT SQRT TAN TAN TANH TANH TRUNCATE Not supported in this release. Table 3-12.
ODBC/MX Conformance SQL Scalar Functions Table 3-12. String Functions (page 2 of 2) ODBC Function SQL/MX Equivalent Function SUBSTRING SUBSTRING UCASE UPPER | UPSHIFT Note. ODBC string functions in queries can return unexpected results for fixed-length (CHAR) column names, because SQL/MX pads a fixed-length string with blanks up to the length of the definition. Therefore, the results from some ODBC string functions can include trailing blanks at the end of the string.
ODBC/MX Conformance ODBC Data Types CONVERT Function ODBC/MX uses the SQL/MX CAST function to support the ODBC CONVERT function. The ODBC CONVERT function has the following format: { fn CONVERT( value_exp, data_type ) } The SQL/MX CAST has this format: CAST( {value_exp | NULL } AS data_type ) SQL/MX translates the CONVERT syntax to the CAST syntax, converting the data type argument to its equivalent SQL/MX value.
ODBC/MX Conformance Unsigned Data Types Table 3-15.
ODBC/MX Conformance Partial Date/Time Values Partial Date/Time Values To use partial date/time values as parameters, provide values through the ODBC/MX data type returned. To fetch partial date/time values follow table SQL/MP to ODBC/MX Date/Time Mappings on page 3-12. Partial date/time values fetched as character strings are returned as partial even when the driver returns a full date/time/timestamp data type.
ODBC/MX Conformance Microsoft Escape Clauses Table 3-17. SQL/MP to ODBC/MX Date/Time Mappings SQL/MP Data Type ODBC/MX Data Type Returned DATETIME MINUTE TO FRACTION SQL_TIMESTAMP DATETIME SECOND SQL_TIME DATETIME SECOND TO FRACTION SQL_TIMESTAMP Microsoft Escape Clauses ODBC/MX accepts Microsoft escape clauses and translates them into equivalent SQL/MX clauses. Table 3-18.
ODBC/MX Conformance Stored Procedures Stored Procedures ODBC/MX supports stored procedures, with the following exceptions: ODBC/MP stored procedures cannot be converted to ODBC/MX procedures. They must be rewritten. Results sets, pointers to cursors, and returning codes are not supported. For more information about stored procedures, see the SQL/MX Guide to Stored Procedures in Java. Transactions and Cursor Behavior with Multiple Statements Table 3-19.
ODBC/MX Conformance Timestamp Values with Fraction Table 3-20. Sample Values Inserted From a C/C++ Program and Their Corresponding Expected Values in Microsecond (page 2 of 2) Value Specified in the Fraction of the Client Program Column Type Expected Value in the Column of the SQL/MX Table 4 timestamp(6) or time(6) 0.000004 987654 timestamp(5) or time(5) 0.98765 87654 timestamp(5) or time(5) 0.08765 7654 timestamp(5) or time(5) 0.00765 654 timestamp(5) or time(5) 0.
ODBC/MX Conformance Timestamp Values with Fraction If a value of the SQLFractionValue property is set to 9 in the ODBCDSN file and a timestamp struct value is inserted from a C/C++ program into a column with type time or timestamp, the fraction field in the timestamp struct is considered in nanoseconds. Table 3-21 lists the sample values that can be inserted from a C/C++ program into the required column type and their corresponding expected values in nanosecond. Table 3-21.
ODBC/MX Conformance Timestamp Values with Fraction Table 3-21. Sample Values Inserted From a C/C++ Program and Their Corresponding Expected Values in Nanosecond (page 2 of 2) Value Specified in the Fraction of the Client Program Column Type Expected Value in Column of the SQL/MX Table 654321 timestamp(2) or time(2) 0.00 54321 timestamp(2) or time(2) 0.00 4321 timestamp(2) or time(2) 0.00 987654321 timestamp(1) or time(1) 0.9 87654321 timestamp(1) or time(1) 0.
ODBC/MX Conformance Timestamp Values with Fraction Table 3-22. SYSTEM_DEFAULT Values Retrieved Using a C/C++ Program (page 2 of 2) Value in the Column of the SQL/MX Table Column Type Value in the Fraction of the Client Program 0.0076 timestamp(4) or time(4) 76 0.0007 timestamp(4) or time(4) 7 0.0000 timestamp(4) or time(4) 0 0.987 timestamp(3) or time(3) 987 0.087 timestamp(3) or time(3) 87 0.008 timestamp(3) or time(3) 8 0.000 timestamp(3) or time(3) 0 0.
ODBC/MX Conformance Timestamp Values with Fraction Table 3-23. Sample Values Retrieved Using a C/C++ Program and Their Corresponding Expected Values in Nanosecond (page 2 of 2) Value in the Column of the SQL/MX Table Column Type Value in the Fraction of the Client Program 0.00006 timestamp(5) or time(5) 60000 0.00000 timestamp(5) or time(5) 0 0.9876 timestamp(4) or time(4) 987600000 0.0876 timestamp(4) or time(4) 87600000 0.0076 timestamp(4) or time(4) 7600000 0.
ODBC/MX Conformance Timestamp Values with Fraction HP NonStop Open System Services ODBC/MX Client Driver for SQL/MX Release 3.
4 ODBC/MX Messages This chapter includes these sections: ODBC/MX Driver Error Codes ODBC/MX Client Messages The ODBCMSG file is the default error message file in OSS ODBC/MX Client Driver. The ODBCMSG file is a key sequenced file and is placed in the $SYSTEM.SYSTEM location in the NSK system. The ODBCMSG file is similar to the default error message file MXOMSG of the Collapsed ODBC/MX Driver version.
ODBC/MX Messages ODBC/MX Client Messages SQLSTATE Messages 08001 No more MXCS servers available to connect. 08001 MXCS services not yet available. 08001 Data source not yet available or not found. 08001 No more ports available to start MXCS servers. 08001 Retry attempts to connect to the data source failed, May be MXCS server not able to register to the MXCS service process. 08002 Connection in use. 08003 Connection not open.
ODBC/MX Messages ODBC/MX Client Messages SQLSTATE Message 28000 Invalid authorization specification. 28000 Invalid authorization specification; access to selected database is denied. 34000 Invalid cursor name. 37000 Syntax error in SQL dynamic statement. 3C000 Duplicate cursor name. SQLSTATE Message 40001 Attempt to initiate new SQL server operation with data pending. 42000 Syntax error or access rule violation. 70100 Operation aborted (server did not process cancel request).
ODBC/MX Messages ODBC/MX Client Messages SQLSTATE Message S1005 Parameter number out of range. S1006 Invalid conversion specified. S1007 Row count not available from the data source. S1008 Operation cancelled. S1009 Invalid argument value. SQLSTATE Message S1010 Function sequence error S1012 Invalid transaction operator code specified. S1015 No cursor name available. S1090 Invalid string or buffer length. S1091 Descriptor type out of range. S1092 Option type out of range.
A Sample ODBC Application Compilation and Linking of the Sample ODBC Application Sample Application compilation step: Use the c89 compiler to compile the application with the header files that are shipped along with the OSS ODBC/MX Client Driver: OSS> c89 -o < output object name> -I/usr/include/odbc/ \ -c < input file for compilation> By default, the header files are located at the /usr/include/odbc/ directory. Example A-1.
Sample ODBC Application Execution and Testing of Sample ODBC Application Ensure that the location of the OSS ODBC/MX driver (ZODBCDLL) is set as the env variable _RLD_FIRST_LIB_PATH. To set the _RLD_FIRST_LIB_PATH variable, run the following command: export _RLD_FIRST_LIB_PATH = Ensure that the ODBCDSN file is present in the same location as that of the sample application. If not present, ensure that the default ODBCDSN file is present in $SYSTEM.SYSTEM.
Sample ODBC Application Execution and Testing of Sample ODBC Application Example A-3. Sample ODBC Application Code /*************************************************************** ***** // // @@@ START COPYRIGHT @@@ // // Copyright 2007 // // HP CONFIDENTIAL: NEED TO KNOW ONLY // // Copyright Hewlett-Packard Development Company, L.P. // Protected as an unpublished work.
Sample ODBC Application Execution and Testing of Sample ODBC Application Example A-3. Sample ODBC Application Code #include #include #include #include #include
Sample ODBC Application Execution and Testing of Sample ODBC Application Example A-3.
Sample ODBC Application Execution and Testing of Sample ODBC Application Example A-3.
Sample ODBC Application Execution and Testing of Sample ODBC Application Example A-3.
Sample ODBC Application Execution and Testing of Sample ODBC Application Example A-3.
Sample ODBC Application Execution and Testing of Sample ODBC Application Example A-3.
Sample ODBC Application Execution and Testing of Sample ODBC Application Example A-3.
Sample ODBC Application Execution and Testing of Sample ODBC Application Example A-3.
Sample ODBC Application Execution and Testing of Sample ODBC Application Example A-3. Sample ODBC Application Code SQLFreeHandle(SQL_HANDLE_DBC, hdbc1); SQLDisconnect(hdbc2); SQLFreeHandle(SQL_HANDLE_DBC, hdbc2); SQLFreeHandle(SQL_HANDLE_ENV, henv); return 0; } HP NonStop Open System Services ODBC/MX Client Driver for SQL/MX Release 3.
Glossary driver manager. The OSS ODBC component that manages access to Database Management System (DBMS) drivers for ODBC applications. The driver manager loads and unloads drivers and passes calls for ODBC functions to the correct driver. Open Database Connectivity (ODBC). An interface specification for an API that defines a standard set of routines that an ODBC application can use to access data in a data source. HP NonStop Open System Services ODBC/MX Client Driver for SQL/MX Release 3.
Glossary Open Database Connectivity (ODBC) HP NonStop Open System Services ODBC/MX Client Driver for SQL/MX Release 3.
Index A ABS function 3-7 ACOS function 3-7 alias names, adding 1-6 ANSI name type 1-6 API functions, ODBC supported 3-2/3-7 unsupported 1-10 architecture 1-1 ASCII function 3-8 ASIN function 3-7 association server, functions of 1-4 ATAN function 3-7 ATAN2 function 3-7 autocommit 3-14 B BIGINT data type 3-10 BINARY data type 3-10 BIT data type 3-10 C CAST function 3-10 catalog restrictions 1-7 CEILING function 3-7 CHAR data type 3-10 CHAR function 3-8 client components of 1-1 connecting to data sources 1-4
Index E Data Types unsigned 3-11 data types unsigned 3-11 data types not supported 1-11 data types supported 3-10 DATABASE function 3-9 DATE data type 3-10 date functions 3-9 DATETIME 3-12 Date/Time values, partial 3-12 DAY function 3-9 DAYNAME function 3-9 DAYOFMONTH function 3-9 DAYOFWEEK function 3-9 DAYOFYEAR function 3-9 DECIMAL data type 3-10 DEGREES function 3-7 descriptor fields, functions for setting and retrieving 3-3 DIFFERENCE function 3-8 DOUBLE PRECISION data type 3-10 driver, ODBC/MX See OD
Index M M managing client data sources 2-1/2-8 mapping, data types 3-12 messages 4-1/4-4 Microsoft escape clauses, support for 3-13 MINUTE function 3-9 MOD function 3-7 MONTH function 3-9 MONTHNAME function 3-9 N name types See object name types NonStop ODBC/MX components, description of 1-1 data types not supported 1-11 security 1-6 NOW function 3-9 NUMERIC data type 3-10 numeric functions supported 3-7 O object name types ANSI 1-6 ANSI for SQL/MP objects 1-6 ANSI for SQL/MX objects 1-6 ODBC conformanc
Index S security ODBC/MX 1-6 server, ODBC/MX mapping to client data source names 1-6 SIGN function 3-8 SIN function 3-8 SINH function 3-8 SMALLINT data type 3-10 SOUNDEX function 3-8 SPACE function 3-8 SQL requests functions for preparing 3-3 functions for submitting 3-4 SQL scalar functions, support for 3-7 SQL stored procedures, support for 3-14 SQLAllocHandle function 3-2 SQLBindCol function 3-4 SQLBindParameter function 3-3 SQLBindParameter restrictions 1-12 SQLBrowseConnect function 3-2 SQLCancel fun
Index T stored procedures 3-14 string functions 3-8 SUBSTRING function 3-9 system functions supported 3-9 system tables, functions for obtaining information about 3-5 V VARBINARY data type 3-10 VARCHAR data type 3-10 W WEEK function 3-9 T tables, system 3-5 TAN function 3-8 TANDEM_SYSTEM_NSK catalog 1-7 TANH function 3-8 TDM_Default_DataSource 1-1 terminating a connection, functions for 3-7 terminating a statement, functions for 3-6 TIME 3-12 TIME data type 3-10 time functions 3-9 timeouts, effect of 1
Index W HP NonStop Open System Services ODBC/MX Client Driver for SQL/MX Release 3.