getResultRows()  getRows()

Chapter 5: General Objects and Methods

getRowData()

Description

Retrieves the current result set row data and puts the data into the object pointed to by dataptr. The dataptr parameter points to the current result set row. Note that the index starts at 1, not 0.

Syntax

getrowData(int rowNum, blob *dataptr)
getRowData(long rowNum, blob *dataptr)
getRowData(int rowNum, string *dataptr)
getRowData(long rowNum, string *dataptr)

Parameter

Description

rowNum

Number of the desired data row. Row numbers begin with zero (0).

dataptr

Pointer to a string or blob to hold the result set data row.

Return value

Integer. Returns a positive integer if successful, and zero or negative integer, if failed.

Usage

Pointer to object

Object

pdbi->getRowData(2, &dataptr);

int rv;blob dataptr;my_dbi.setStmt(“stmt1”);my_dbi.exec();rv = my_dbi.getRowData(2, &dataptr);if(!rv) erm(“getRowData(): METHOD FAILED”);else erm(“getRowData(): METHOD PASS”);dataptr.debug();





Copyright © 2005. Sybase Inc. All rights reserved. getRows()

View this book as PDF