⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 single.c

📁 一本介绍oracle的书籍
💻 C
字号:
#include <stdio.h>#include <stdlib.h>#include <string.h>#include <strings.h>#include <math.h>#include <pthread.h>#include "dbfunc.h"#define MODULE_NAME "SINGLE"static char connect[20]="dbuser/oracle";void Func();int main(){    Func();    exit(0);}                         void Func(){    int result;    emp_t emp;    if((result=DbsConnect(connect))!=DB_OK)    {        printf("connect fail, sqlcode:%d\n", result);         goto FUNC_END;    }    emp.no=0;    result=DbsEMP_UPD_Info(&emp);    if(result!=DB_OK && result!=DB_NOTFOUND)    {        printf("database error, sqlcode:%d\n", result);         DbsRollback();        goto FUNC_END;    }    if(result==DB_NOTFOUND)    {        printf("not found\n");        goto FUNC_END;    }    DbsCommit();    emp.no=0;    result=DbsEMP_SEL_Info(&emp);    if(result!=DB_OK && result!=DB_NOTFOUND)    {        printf("database error, sqlcode:%d\n", result);         goto FUNC_END;    }    if(result==DB_NOTFOUND)    {        printf("not found\n");        goto FUNC_END;    }    printf("no:%012.0lf name:%s, update time:%s\n",        emp.no, emp.name, emp.upd_ts);  FUNC_END:    DbsDisconn();    return;}

⌨️ 快捷键说明

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