home *** CD-ROM | disk | FTP | other *** search
- .Na "dbadlen"
- .Aa
- .Fu
- Return the actual length of the data for a compute column.
- .Ih "compute column, length of data in"
- .Sy
- .Sf "DBINT dbadlen(dbproc, computeid, column)"
- .Sp "DBPROCESS" "*dbproc"
- .Sp "int" "computeid"
- .Sp "int" "column"
- .Co
- .Bl
- This routine returns the actual length of the data for a particular compute column.
- .Bl
- Use the \f2dbaltlen()\f1 routine to determine the maximum possible length for the data.
- Use \f2dbadata()\f1 to get a pointer to the data.
- .Bl
- Here's a program fragment that illustrates the use of \f2dbadlen()\fP:
- .ta +4n +4n +4n +4n +4n +4n
- .SD
- .so dbadlen.ex
- .ED
- .Bz
- .Pa
- .Pi dbproc
- A pointer to the DBPROCESS structure that provides the connection
- for a particular front-end/\*S process. It contains all the
- information that \*L uses to manage communications and data between the
- front end and \*S.
- .Pi computeid
- The id that identifies the particular compute row of interest.
- A SQL SELECT statement may have multiple COMPUTE clauses,
- each of which returns a separate compute row.
- The \f2computeid\f1 corresponding to the
- first COMPUTE clause in a SELECT is 1.
- The \f2computeid\f1 is returned by \f2dbnextrow()\f1
- or \f2dbgetrow().\f1
- .Pi column
- The number of the column of interest. The first column is number 1.
- .in -.375i
- .Re
- .br
- The length, in bytes, of the data for a particular compute column.
- If there is no such column or COMPUTE clause,
- \f2dbadlen()\f1 returns -1.
- If the data has a null value,
- .I "dbadlen()"
- returns 0.
- .Sa
- dbadata,
- dbaltlen,
- dbalttype,
- dbgetrow,
- dbnextrow,
- dbnumalts
-