![](https://img-blog.csdnimg.cn/20190918140037908.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
03_数据库
日收集
慎独5
这个作者很懒,什么都没留下…
展开
-
linuxC++_OCCI访问oracle
下列代码测试了通过linux occi方式连接数据库。#include <iostream>#include <occi.h>using namespace std;#define LINUXOCCI //避免函数重定义错误using namespace oracle::occi;int main(){ Environment *env=Environment::createEnvironment(Environment::DEFAULT); c原创 2020-06-27 22:13:41 · 151 阅读 · 0 评论 -
linuxC_OCI方式ORACLE编程
本代码记录了通过oci方式访问oracle的代码:#include <stdio.h>#include <stdlib.h>#include <string.h>#include <oci.h>// cols for query result:#define N 8static OCIEnv *p_env;static OCIError *p_err;static OCISvcCtx *p_svc;static OCISt原创 2020-06-27 22:07:19 · 339 阅读 · 0 评论 -
rhel8_oracle12c_occi_ORA-24960错误
在rhel8中,使用C++代码关联oracle12c时,使用自带库,可以编译成功。但是运行时,会提示:ORA-24960: the attribute OCI_ATTR_USERNAME is greater than the maximum allowable length of 255。错误原因: gcc-c++版本太高,需要更换低版本的。先删除自带的包,dnf remove gcc然...原创 2019-11-02 17:16:18 · 924 阅读 · 0 评论 -
linux_C通过代码访问mysql
#include <stdio.h>#include <mysql.h>int main(int argc,char *argv[]){ MYSQL conn; int res; mysql_init(&conn); //"root":数据库管理员 "":root密码 "db_jesse":数据库的名字 if(mysql_real_connect(&conn, "localhost", "root", "", "db.原创 2020-06-27 22:20:01 · 123 阅读 · 0 评论