dbcolbrowse

Determines whether the source of a result column can be updated with the DB-Library browse-mode facilities.

Syntax

BOOL dbcolbrowse (
PDBPROCESS
dbproc,
INT
colnum );

where

dbproc
Is the DBPROCESS structure that is the handle for a particular workstation/ SQL Server process. It contains all the information that DB-Library uses to manage communications and data between the workstation and SQL Server.
colnum
Is the number of the result column. The first column is number 1.

Returns

TRUE or FALSE.

Remarks

The dbcolbrowse function is one of the DB-Library browse-mode functions. It determines whether the database column that is the source of a result column in a select list can be updated with the DB-Library browse-mode facilities. This function is useful for examining ad hoc queries. If the query has been hardcoded into the program, dbcolbrowse is unnecessary.

The dbcolbrowse function can be called any time after dbresults.

To determine the name of the source column given the name of the result column, use dbcolsource.

Example

Only a column derived from a table that has a unique index and a timestamp column can be updated. It cannot be the result of a Transact-SQL expression. For example, in the following select list, result columns 1 and 2 (title and category) can be updated, but column 3 (wholesale) cannot because it is the result of an expression:

select title, category=type, wholesale=(price * 0.6)
from inventory for browse

See Also

dbcolsource, dbqual, dbtabbrowse, dbtabcount, dbtabname, dbtabsource, dbtsnewlen, dbtsnewval, dbtsput; Browse Mode, Programming with DB-Library, and Bulk-Copy Functions