Neoview ODBC Drivers Manual (R2.5)

For information on the necessary data source configuration options, you will need to add
to the respective configuration files (for example, to odbc.ini).
You must configure the following data source attributes. For an example of configuration
values, refer to the MXODSN file template provided with the installation. This is an example:
DESCRIPTION = Default Data Source
Catalog = CAT
Schema = SCH
DataLang = 0
FetchBufferSize = SYSTEM_DEFAULT
Server = TCP:arc0101.caclab.cac.cpqcorp.net:5000
SQL_ATTR_CONNECTION_TIMEOUT = SYSTEM_DEFAULT
SQL_LOGIN_TIMEOUT = SYSTEM_DEFAULT
SQL_QUERY_TIMEOUT = NO_TIMEOUT
For questions related to your third party driver manager, refer to your driver manager's
documentation.
Neoview Platform Specific Extensions and Attributes
Handling Larger Row Counts
SQL_ATTR_ROWCOUNT64_PTR
For 32-bit applications, when the number of rows affected by an UPDATE, INSERT, or DELETE
operation exceeds 2,147,483,647 rows, SQLRowCount will return an error with a diagnostic
message that an overflow occurred. In this case, an application can use the
SQL_ATTR_ROWCOUNT64_PTR attribute in a SQLGetStmtAttr call to retrieve the actual rows
affected into a 64-bit integer.
For 64-bit applications, you do not need to use the SQL_ATTR_ROWCOUNT64_PTR attribute.
SQLRowCount for the 64-bit driver can return values greater than 2,147,483,647.
Specifying a Job ID or Session Name
SQL_ATTR_SESSIONNAME
Neoview ODBC provides the ability to specify a Session Name that persists for the duration of
a connection. One common use for this feature is to implement a “job ID”; you decide what
collection of work constitutes a job and assign the same session name to each connection associated
with the job.
To use this feature, include the Neoview-specific header file called hpsqlext.h in your
application, and specify the connection attribute SQL_ATTR_SESSIONNAME before the
connection is established. Once the connection is established, you may not change the attribute
value.
Use the ODBC API SQLSetConnectAttr to set a connection attribute. Use the ODBC API
SQLGetConnectAttr to retrieve the current value.
The value of SQL_ATTR_SESSIONNAME has the following constraints:
It is a string value with a maximum length of 24 bytes.
The value can include alphanumeric characters and the underscore (_) character .
The value is case sensitive, so “123abc” is different from “123ABC”.
An empty string is permissible. In fact, the empty string is the default value. This value
implies that the connection is not associated with any specific job.
Job ID is independent of other connection properties, such as the user ID or client name. You
can use the same value for multiple connections, including multiple concurrent connections.
40 HP Neoview ODBC Drivers Overview for UNIX