ex3.c

Example for using sqlo_run

00001 /* $Id: ex3.c 221 2002-08-24 12:54:47Z kpoitschke $ */
00002 #include <stdio.h>
00003 #include <stdlib.h>
00004 #include "examples.h"
00005 
00006 int update_manager(sqlo_db_handle_t dbh)
00007 {
00008   const char * argv[2];
00009   int stat;
00010 
00011   argv[0] = "0.5";
00012   argv[1] = "MANAGER";
00013 
00014   stat = sqlo_run(dbh, "UPDATE EMP SET SAL = SAL * :1 WHERE JOB = :2",
00015                  2, argv);
00016   if (0 > stat) {
00017     error_exit(dbh, "sqlo_run");
00018   }
00019   return stat;
00020 }
00021 /* $Id: ex3.c 221 2002-08-24 12:54:47Z kpoitschke $ */
00022 

Generated on Mon May 21 13:42:17 2007 for libsqlora8 by  doxygen 1.4.7