dbfunc.pc
来自「一本介绍oracle的书籍」· PC 代码 · 共 40 行
PC
40 行
#include <stdio.h>#include <stdlib.h>#include <string.h>#include <strings.h>#include <math.h>#include <pthread.h>#include "sqlca.h"#include "sqlda.h"#include "dbcom.h"#include "dbfunc.h"#define MODULE_NAME "DBFUNC"#define TABLE_NAME EMPint DbsEMP_SEL_Info(int thrd_index, emp_t *p_emp){ SQL_THREAD_SAFE_PREPARE; EXEC SQL CONTEXT USE :a_thrd_conn[thrd_index].context; EXEC SQL select * into :p_emp from emp where no=:p_emp->no; SQL_CODE_PROCESS("EMP", "SEL");}int DbsEMP_UPD_Info(int thrd_index, emp_t *p_emp){ SQL_THREAD_SAFE_PREPARE; EXEC SQL CONTEXT USE :a_thrd_conn[thrd_index].context; EXEC SQL update emp set upd_ts=to_date(sysdate, 'yyyymmddhh24miss') where no=:p_emp->no; SQL_CODE_PROCESS("EMP", "UPD");}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?