JagCmReleaseConnection  JagCompleteWork

Chapter 5: C Routines Reference

JagColAttributes

Description

Specify additional metadata for a column to be sent in a result set.

Syntax

JagStatus JagColAttributes(
                  SQLSMALLINT  item,
                  SQLSMALLINT  descType,
                  SQLPOINTER   descBuf,
                  SQLINTEGER   buflen)

Parameters

item

The number of the column of interest. Column numbers start at 1.

descType

Must be SQL_COLUMN_MONEY.

descBuf

The address of a JagBoolean variable. Set the variable to JAG_TRUE to specify that the column represents a cash value; set the variable to JAG_FALSE otherwise. By default, columns do not represent a cash value.

buflen

The number of bytes in the descBuf buffer.

Usage

JagColAttributes specifies additional column attributes beyond those specified when JagDescribeCol is called. The only supported attribute is SQL_COLUMN_MONEY, which indicates that a column represents a cash value.

If you set the SQL_COLUMN_MONEY attribute to JAG_TRUE for a column, the column’s values must be convertible to numeric values. Integer, floating-point, and fixed-point numeric data can be converted. Strings can be converted if the string values have the proper syntax to represent decimal numbers. Other datatypes can not be converted.

NoteNote If you are using Open Client datatypes with JagDescribeCol and JagBindCol, do not call JagColAttributes. Use the CS_MONEY datatype if a column represents a cash value.

See also

JagBindCol, JagDescribeCol





Copyright © 2005. Sybase Inc. All rights reserved. JagCompleteWork