Thread: ECPG: Missing in SQL standard? getting _one_ row out of a multirow descriptor

ECPG: Missing in SQL standard? getting _one_ row out of a multirow descriptor

From
Christof Petig
Date:
Hi all,

You might know that 7.2 supports multirow descriptors (select ... into
descriptor ...). You can get the number of rows in a descriptor with a
call to  get descriptor ... :VAR=cardinality  .

But as I read the standard there is no way of reading exactly one row
(or to get the data row by row). Does anybody have an opinion on how to
name it? (I didn't invent this strange 'value' syntax)

get descriptor  name  :VAR = count;    is the number of columns
get descriptor  name  value :N  :VAR = cardinality;    gets the number
of rows of column N
get descriptor  name  value :N  :VAR = data;    gets all rows of column
N (starting by 1)

what about

get descriptor  name  value :N  :VAR = data[:M];     to get element
(column,row)=(N,M)

Any other ideas on how to name it?

Or does anybody know the standard better than I? redesigning
ECPGget_descriptor is just another issue but solveable.

Remember this is about extending the standard. But this standard is at
most worth the paper it is written on. Oracle never mentions this method
of dynamic SQL, they use SQLDA (which I strongly dislike compared to
this clean way of accessing dynamic data).

Yours   Christof