CLI with parameterized query

Connectivity

CLI with parameterized query

Hi,

I'm trying to write a select statement that uses more than on parameterized fields. (Select * from Table where col1 =? and col2 =?).

How do i code this functionality using CLI? I saw an example in a CLI manual for a single parameterized field but I’m not very sure how to extend the solution for two parameters.

For the one parameter, i allocated the following structure -
dbcarea.extension_pointer = malloc ( sizeof( D8CAIRX ) + (2 *(sizeof(D8XIELEM) + sizeof(D8XIEP) )));

From my understanding, each parameter field needs ( 2 * sizeof(D8XIELEM) + sizeof(D8XIEP) ) blocks.

In my example, since there are two parameter fields my allocation should be something like

dbcarea.extension_pointer = malloc ( sizeof( D8CAIRX ) + (4 *(sizeof(D8XIELEM) + sizeof(D8XIEP) )));

Am i right?

Any help is appreciated.

Thank you

Regards.