GetColumnLength

Description

Retrieves the length of a column that you identify by column name or column number. This method is for use in JSP targets only.

Applies to

PSCursorClass objects

Syntax

cursorobject.GetColumnLength ( String strColName )
cursorobject.GetColumnLength ( int iCol )

Argument

Description

cursorobject

A variable that contains a reference to an instance of PSCursorClass

strColName

Name of the column for which you want to obtain the length

iCol

Number of the column for which you want to obtain the length

Returns

int

Usage

Use this method to obtain the length of a column in the cursor. You need to construct an object of the PSCursorClass or return an object of the PSCursorClass from the Execute method on an object of type PSCommandClass.

Examples

Example 1

This example returns the length of the second column in a cursor:

int li_col=0;
PSCursorClass myCursor = null;
...
myCursor = myCommand.Execute();
li_col = myCursor.GetColumnLength (2);