Updated on 2024-08-20 GMT+08:00

PQexecParams

Description

Runs a command to bind parameters.

Prototype

PGresult* PQexecParams(PGconn* conn, 
                       const char* command,
                       int nParams,
                       const Oid* paramTypes,
                       const char* const* paramValues,
                       const int* paramLengths,
                       const int* paramFormats, 
                       int resultFormat);

Parameters

Table 1 PQexecParams parameters

Keyword

Description

conn

Connection handle.

command

SQL text string.

nParams

Number of parameters to be bound.

paramTypes

Types of parameters to be bound.

paramValues

Values of parameters to be bound.

paramLengths

Parameter lengths.

paramFormats

Parameter formats (text or binary).

resultFormat

Result format (text or binary).

Return Values

PGresult pointers