home *** CD-ROM | disk | FTP | other *** search
- .Na "dbtsput"
- .mc |
- .Aa
- .Fu
- Put the new value of the timestamp column
- into the given table's current row in the DBPROCESS.
- .Ih "timestamp column, putting new value into DBPROCESS (browse mode)"
- .Sy
- .Sf "RETCODE dbtsput(dbproc, newts, newtslen, tabnum, tabname)"
- .Sp "DBPROCESS" "*dbproc"
- .Sp "DBBINARY" "*newts"
- .Sp "int" "newtslen"
- .Sp "int" "tabnum"
- .Sp "char" "*tabname"
- .Co
- .Bl
- \f2dbtsput()\f1 is one of the \*L browse mode routines.
- See the Introduction for a detailed discussion of browse mode.
- .Bl
- \f2dbtsput()\f1 manipulates the timestamp column.
- The WHERE clause returned by \f2dbqual()\f1 contains a call to the
- \f2tsequal\f1 built-in function.
- .Ih "tsequal function"
- When such a WHERE clause is used in an UPDATE statement,
- the \f2tsequal\f1 function places a new value in
- the updated row's timestamp column and returns the new timestamp value
- to the application (if the update is successful).
- If the same row is updated a second time,
- the UPDATE statement's WHERE clause
- must use the latest timestamp value.
- .sp 0.5v
- This routine updates the timestamp in the DBPROCESS for the row currently being browsed.
- Then, if the application needs to update the row a second time, it can call
- \f2dbqual()\f1 to formulate a new WHERE clause that uses the new timestamp.
- .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.
- .sp 0.5v
- This must be the DBPROCESS used to perform the original SELECT query.
- .Pi newts
- A pointer to the new timestamp value.
- It is returned by
- \f2dbtsnewval()\f1.
- .Pi newtslen
- The length of the new timestamp value.
- It is returned by
- \f2dbtsnewlen()\f1.
- .Pi tabnum
- The number of the updated table. Table numbers start
- at 1.
- \f2tabnum\f1 must refer to a browsable table.
- Use \f2dbtabbrowse()\f1 to determine whether a table is browsable.
- .sp 0.5v
- If this value is -1, the \f2tabname\f1 parameter will be used to identify the table.
- .Pi tabname
- A pointer to a null-terminated table name.
- \f2tabname\f1 must refer to a browsable table.
- If this pointer is NULL, the \f2tabnum\f1 parameter will be used to identify the table.
- .in -.375i
- .Re
- .br
- SUCCEED or FAIL.
- The following situations will cause this routine to return FAIL:
- .Bl
- The application tries to update the timestamp of a non-existent row.
- .Bl
- The application tries to update the timestamp using NULL as the timestamp value (\f2newts\f1).
- .Bl
- The specified table is non-browsable.
- .Bz
- .Sa
- dbcolbrowse,
- dbcolsource,
- dbqual,
- dbtabbrowse,
- dbtabcount,
- dbtabname,
- dbtabsource,
- dbtsnewlen,
- dbtsnewval
- .mc
-