Using TOrasession without VCL

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Hoeh3010
Posts: 3
Joined: Sun 27 Jan 2013 19:49

Using TOrasession without VCL

Post by Hoeh3010 » Sun 14 Jan 2018 19:06

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

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: Using TOrasession without VCL

Post by MaximG » Mon 15 Jan 2018 14:02

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.

Hoeh3010
Posts: 3
Joined: Sun 27 Jan 2013 19:49

Re: Using TOrasession without VCL

Post by Hoeh3010 » Tue 16 Jan 2018 11:45

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

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: Using TOrasession without VCL

Post by MaximG » Wed 17 Jan 2018 07:55

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

Hoeh3010
Posts: 3
Joined: Sun 27 Jan 2013 19:49

Re: Using TOrasession without VCL

Post by Hoeh3010 » Thu 18 Jan 2018 22:15

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.

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: Using TOrasession without VCL

Post by MaximG » Fri 19 Jan 2018 13:58

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)

Post Reply