Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Library : Other (not classified elsewhere) » cannot use oracle from dll
cannot use oracle from dll [message #53112] Mon, 02 March 2020 21:28 Go to previous message
aftershock is currently offline  aftershock
Messages: 141
Registered: May 2008
Experienced Member
Hi,
I cannot use oracle from dll...
example

/#include <windows.h>
#include "dbconnect.h"

#include <Core/Core.h>

#include <Oracle/Oracle7.h>

using namespace Upp;

BOOL APIENTRY DllMain(HANDLE hModule, DWORD reason, LPVOID lpReserved)
{
switch (reason) {
case DLL_PROCESS_ATTACH:
break;
case DLL_PROCESS_DETACH:
break;
case DLL_THREAD_ATTACH:
break;
case DLL_THREAD_DETACH:
break;
}
return TRUE;
}

FileAppend f("dbconnectdll.log");
DllExport void Test() {}
DllExport void ConnectDb(char * connectstr)
{
Oracle7 oracle;
// One<Sql> Sqli;
// Sqli = new Sql(oracle);
oracle.SetTrace();
f << connectstr;
f.Flush();
OutputDebugString(connectstr);
/*f << connectstr;
f.Flush();*/
if (!oracle.Open(connectstr))
{
OutputDebugString("Can't create or open database file\n" + oracle.GetLastError());
// Cout() << "Can't create or open database file\n" << oracle.GetLastError();
// int b= 4;
}
else
OutputDebugString("connected");
// Sql Sqli (oracle);
}

I get an "Error loading OCI7 Oracle database client library

Note I did not get this error when I had the same code in a console application.
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: [Solved]CoreTutoral package problem
Next Topic: lzma compression does not seem to work
Goto Forum:
  


Current Time: Sun Jun 07 09:26:08 CEST 2020

Total time taken to generate the page: 0.01354 seconds