Home | Previous Page | Next Page   Client Functions > Calling a Client Function >

Function Syntax

The database server and the application both partially implement each client function. You can execute a client function with either SQLPrepare() and SQLExecute() or with SQLExecDirect(). You need to call SQLBindParameter() or SQLBindCol() to bind each parameter before you call SQLExecute() or SQLExecDirect().

To execute a client function with SQLPrepare() and SQLExecute()
  1. Prepare the SQL statement for the client function.
  2. Bind the parameters.
  3. Execute the SQL statement.

The following code examples illustrates these steps for ifx_lo_open():

rc = SQLPrepare(hstmt, "{? = call ifx_lo_open(?, ?, ?)}",
   SQL_NTS); 
rc = SQLBindParameter(...); 
rc = SQLExecute(hstmt); 
To execute a client function with SQLExecDirect()
  1. Bind the parameters.
  2. Execute the SQL statement.

The following code example illustrates these steps for ifx_lo_open():

rc = SQLBindParameter(...); 
rc = SQLExecDirect(hstmt, "{? = call ifx_lo_open(?, ?, ?)}",
   SQL_NTS); 
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]