Download Informix CLI Programmer`s Manual, Version 2.5

Transcript
SQLDataSources
SQLDataSources
Level 2
SQLDataSources lists data-source names. This function is implemented
solely by the driver manager.
Syntax
RETCODE SQLDataSources(henv, fDirection, szDSN, cbDSNMax,
pcbDSN, szDescription, cbDescriptionMax, pcbDescription)
The SQLDataSources function accepts the following arguments.
Type
Argument
Use
Description
HENV
henv
Input
Environment handle.
UWORD
fDirection
Input
Determines whether the driver
manager fetches the next datasource name in the list
(SQL_FETCH_NEXT) or whether
the search starts from the
beginning of the list
(SQL_FETCH_FIRST).
UCHAR FAR *
szDSN
Output
Pointer to storage for the datasource name.
SWORD
cbDSNMax
Input
Maximum length of the szDSN
buffer; this buffer need not be
longer than
SQL_MAX_DSN_LENGTH + 1.
SWORD FAR *
pcbDSN
Output
Total number of bytes (excluding
the null-termination byte)
available to return in szDSN. If
the number of bytes available to
return is greater than or equal to
cbDSNMax, the data-source name
in szDSN is truncated to
cbDSNMax – 1 bytes.
(1 of 2)
INFORMIX-CLI Function Reference 13-81