Oracle 数据库中的 OCCI - 找不到过程 OCIPIsDesc.dll 库中重建的入口点
OCCI in Oracle database - Couldn't find entry point of procedure OCIPIsDescRebuilt in OCI.dll library
我决定使用OCCI
(Oracle c++调用接口)将我的c++游戏与Oracle数据库连接起来。我终于成功地编译了包含occi.h
的程序,但是现在,当我运行程序时,我得到了消息:
Couldn't find entry point of procedure OCIPIsDescRebuilt in OCI.dll library.
下面是我的一小部分代码,我试图与数据库连接:
#include <occi.h>
#include <iostream>
#include <string>
#include <iomanip>
#include <cstdlib>
using namespace std;
using namespace oracle::occi;
int main()
{
Environment *env = Environment::createEnvironment(Environment::DEFAULT);
Connection *conn = env->createConnection("system", "password","localhost:1521");
cout << "Podaj nick gracza nr 1: ";
cin >> nick[1];
cout << "Podaj nick gracza nr 2: ";
cin >> nick[2];
Statement *stmt = conn->createStatement();
stmt->executeUpdate("INSERT INTO uzytkownicy VALUES('1','A',nick[1])");
stmt->executeUpdate("INSERT INTO uzytkownicy VALUES('1','B',nick[2])");
ResultSet *rs = stmt->executeQuery("SELECT * FROM basket_tab");
cout << "The basket has:" << endl;
while (rs->next())
{
string fruit = rs->getString(1); // get the first column as string
int quantity = rs->getInt(2); // get the second column as int
cout << quantity << " " << fruit << endl;
}
env->terminateConnection(conn);
Environment::terminateEnvironment(env);
}
我使用MS Visual Studio 2010和Oracle Database Express Edition 11g Release 2(11.2)。除了Oracle®c++调用接口程序员指南,11g Release 2(11.2),我还使用了以下网站的资料:
- Mark Williams博客
- 这个线程博客
我该如何解决这个问题?也许有一个更简单的方法(作为配置)与数据库连接使用c++程序比通过OCCI
?
我能够通过将oci.dll文件从Oracle 12c即时客户端复制到我的应用程序的bin/Debug或bin/Release目录来摆脱此错误,因此它将被加载,而不是在默认的Oracle 11客户端中安装的oci.dll。
相关文章:
- 挂起和取消挂起一个文件DLL
- std::threads可以从Windows DLL中的全局变量创建/销毁吗?
- 导入库可以跨dll版本工作吗
- 从C++dll访问C#中的一行主要参数
- 链接到自行创建的dll失败
- 为什么使用 P/Invoke 调用 dll 时,某些计算机中的 LoadLibrary 失败?
- 在调用FreeLibrary后,释放动态链接到具有相同版本的CRT堆的DLL的内存
- 如何指定我希望我的LIB链接到的DLL文件?-Visual Studio 2019
- 如何将图像传输到c++(dll)中的缓冲区,然后在c#的缓冲区中读/写
- C++:将外部库链接到dll库
- 在 Windows 上,是否可以让 dll 在不使用 PATH 环境变量的情况下在另一个文件夹中查找依赖项?
- 不同的Visual Studio版本中缺少.dll
- 从DLL中删除类的实例
- 如何包装第三方DLL在R中使用
- 使用c#访问c++dll中带有char*参数的函数时发生AccessViolationException
- 系统.将数组移交给c#中动态加载的c++DLL时发生AccessViolationException
- 为什么导入Mixed native/CLR lib.dll的本机C++应用程序没有在Mixed lib.dll中的外部变
- 当我使用 C++ 中的 C# dll 来使用 Selenium 时,存在异常处理问题
- Python ctypes:不会按预期加载 dll
- Oracle 数据库中的 OCCI - 找不到过程 OCIPIsDesc.dll 库中重建的入口点