Main Page   Modules   File List   Globals   Related Pages   Examples  

ex8.c

Example for using sqlo_exec.

/* $Id: ex8.c,v 1.4 2002/08/24 12:54:47 kpoitschke Exp $ */
#include <stdio.h>
#include <stdlib.h>
#include "examples.h"

int update_emp(sqlo_db_handle_t dbh, double factor, const char * job)
{
  int stat;
  char stmt[1024];

  sprintf(stmt, "UPDATE EMP SET SAL = SAL * %f WHERE JOB = '%s'",
          factor, job);

  if ( 0 > (stat = sqlo_exec(dbh, stmt)))
    error_exit(dbh, "sqlo_run");

  return stat;                  /* number of processed rows */
}

/* $Id: ex8.c,v 1.4 2002/08/24 12:54:47 kpoitschke Exp $ */


Generated on Mon Aug 25 12:28:29 2003 for libsqlora8 by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002