ex4.c

Example for using sqlo_open

00001 /* $Id: ex4.c 221 2002-08-24 12:54:47Z kpoitschke $ */
00002 #include <stdio.h>
00003 #include <stdlib.h>
00004 #include "examples.h"
00005 
00006 sqlo_stmt_handle_t open_cursor(sqlo_db_handle_t dbh)
00007 {
00008   sqlo_stmt_handle_t sth;
00009   int argc = 0;
00010   const char * argv[1];
00011   
00012   argv[argc++] = "1000";
00013 
00014   if ( 0 > (sth = (sqlo_open(dbh, "SELECT ENAME, SAL FROM EMP WHERE SAL >= :1", 
00015                              argc, argv)))) {
00016     error_exit(dbh, "sqlo_open");
00017   }
00018   return sth;
00019 }
00020 
00021 /* $Id: ex4.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