ex6.c

来自「Linux下的操作oracle数据库的连接库」· C语言 代码 · 共 33 行

C
33
字号
/* $Id: ex6.c,v 1.5 2002/08/24 12:54:47 kpoitschke Exp $ */#include <stdio.h>#include <stdlib.h>#include "examples.h"sqlo_stmt_handle_t reopen_cursor(sqlo_db_handle_t dbh, double min_income){  static sqlo_stmt_handle_t sth = SQLO_STH_INIT;  int argc = 0;  const char * argv[1];  char hlp[64];  sprintf(hlp, "%f", min_income);  argv[argc++] = hlp;  if (SQLO_STH_INIT == sth) {    /* first time, open a new cursor */    if ( 0 > (sqlo_open2(&sth, dbh,                          "SELECT ENAME, SAL FROM EMP WHERE SAL >= :1",                          argc, argv))) {      error_exit(dbh, "sqlo_open");    }  } else {    /* next time, bind again with new variables */    if ( 0 > sqlo_reopen(sth, argc, argv))      error_exit(dbh, "sqlo_reopen");  }  return sth;}/* $Id: ex6.c,v 1.5 2002/08/24 12:54:47 kpoitschke Exp $ */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?