ODBC Server Reference Manual
UNIX Notes
HP NonStop ODBC Server Reference Manual—429151-002
9-2
DBIORDESC
DBIORDESC
DBIORDESC gives access to the UNIX file descriptor used by a DBPROCESS to read
data coming from SQL Server. DBIORDESC has the following syntax:
dbproc
a pointer to the DBPROCESS structure that provides the connection for a
particular front-end process or SQL Server process. It contains all the information
that DB-LIBRARY uses to manage communications and data between the front
end and SQL Server.
Comments
The following comments apply to DBIORDESC:
•
This routine provides a way for an application to respond effectively to multiple
input streams. Depending on the nature of your application, the time between a
request for information from SQL Server (usually made using a call to
dbsqlsend()) and SQL Server’s response (read by calling dbsqlok(),
dbresults(), or dbnextrow()) can be significant. You can use this time to
service other parts of your application.
The DBIORDESC() routine provides a way to obtain the I/O descriptor that a
DBPROCESS uses to read the data stream from SQL Server. This information can
then be used with various operating system facilities (such as the UNIX select()
call) to allow the application to respond effectively to multiple input streams.
•
The file descriptor returned by this routine can be used only with operating system
facilities that do not read data from the incoming data stream. If data is read from
this stream by any means other than through a DB-LIBRARY routine,
communications between the front end and SQL Server become scrambled.
Table 9-1. DB-LIBRARY Functions and Macros for the UNIX Environment
Function or Macro Description
DBIORDESC Provides program access to the UNIX file descriptor used by a
DBPROCESS to read data coming from SQL Server.
DBIOWDESC Provides program access to the UNIX file descriptor used by a
DBPROCESS to write data to SQL Server.
DBRBUF Determines whether the DB-LIBRARY network buffer contains any
unread bytes.
int DBIORDESC (dbproc)
DBPROCESS *dbproc;