Page 1 of 1
Using TOrasession without VCL
Posted: Sun 14 Jan 2018 19:06
by Hoeh3010
Hallo,
I want to use the ODAC Components without the VCL inside of an own class . But unfortunately I receive a link - error "DATA.DBCONSTS.OBJ" can not be opened. In the class header I am including "DbAccess.hpp" and "Ora.hpp" and in the corresponding cpp-File I am using: #pragma link "DBAccess" and #pragma link "Ora".
I hope that somebody is able to help me. - Oh, I am using C++ Builder 10.2 for designing my programs.
Best regards
Andreas Höhenberger
Re: Using TOrasession without VCL
Posted: Mon 15 Jan 2018 14:02
by MaximG
We tested the work of ODAC 10.1.3 without using VCL and found no problems. For testing, we created the simplest console application, the source code of which is below:
Code: Select all
#include "Ora.hpp"
#pragma hdrstop
#pragma argsused
#ifdef _WIN32
#include <tchar.h>
#else
typedef char _TCHAR;
#define _tmain main
#endif
#include <stdio.h>
#pragma link "Ora"
int _tmain(int argc, _TCHAR* argv[])
{
TOraSession *OraSession = new TOraSession(NULL);
OraSession->Server = "<your TNS Name>";
OraSession->Username = "scott";
OraSession->Password = "tiger";
OraSession->Connect();
return 0;
}
We successfully compiled this application and connected to Oracle DB using it. Please repeat the same steps in your test environment and let us know the results.
Re: Using TOrasession without VCL
Posted: Tue 16 Jan 2018 11:45
by Hoeh3010
Thank you for your answer. I tried it out, but I got the same error message.
So I guess, that there could be something wrong with my compiler and linker settings, but I have no idea, what I should change.
best regards
Andreas Höhenberger
Re: Using TOrasession without VCL
Posted: Wed 17 Jan 2018 07:55
by MaximG
Perform the next step. Open the * .cbproj file of your project in any test editor and find the "FrameworkType" tag in it. Specify in it the following value:
Code: Select all
<FrameworkType>None</FrameworkType>
Save the result and compile the project in RAD Studio again
Re: Using TOrasession without VCL
Posted: Thu 18 Jan 2018 22:15
by Hoeh3010
MaximG wrote:Perform the next step. Open the * .cbproj file of your project in any test editor and find the "FrameworkType" tag in it. Specify in it the following value:
Code: Select all
<FrameworkType>None</FrameworkType>
Save the result and compile the project in RAD Studio again
Hallo,
the specified tag is OK. I made my class now inside a vcl-based application and tried to build my program and it worked. So I guess, that compiling with the VCL framework does something different. It seems, that one or more paths will not be found.
Re: Using TOrasession without VCL
Posted: Fri 19 Jan 2018 13:58
by MaximG
For a detailed analysis of the issue, please compose and send us the simplest console application, the compilation of which causes the described error. You can do this via the e-support form (
https://www.devart.com the "Support"\"Request Support" menu)