Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: FireDAC ambiguity error ? USHORT


This question is answered. Helpful answers available: 1. Correct answers available: 1.


Permlink Replies: 5 - Last Post: Jan 3, 2017 11:29 PM Last Post By: Dmitry Arefiev
John MacDonald

Posts: 179
Registered: 3/22/98
FireDAC ambiguity error ? USHORT  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 28, 2016 7:11 AM
I have not tested this with a test app yet;
but it appears that a major part of my app will not work because of ambiguity between insafe.h - USHORT and a version included when you use Interbase and FireDAC

In checking the internet some others have had this issue, but, it has been fixed by the time they get to Berlin.

I'm moving a BDE app to FireDAC.
To move it to Berlin at the same time does not seem to be a very elegant way to make things work right now.

I am using XE6, the BDE( until it is stripped out ), Interbase and FireDAC.

Using the BDE, I control the redraw of values found in a dbgrid based on information from the databse.

It has been a long road to convert the application and all of its components and database connections.
This seems like a silly reason to be stuck.

Any help....

--
JMAC out
Dmitry Arefiev

Posts: 1,406
Registered: 12/7/03
Re: FireDAC ambiguity error ? USHORT
Helpful
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 28, 2016 11:09 PM   in response to: John MacDonald in response to: John MacDonald
I believe you are using C++ Builder ? There is not much what you can do:
1) Upgrade to Berlin.
2) Try to rename FireDAC USHORT (and similar types) to ISC_USHORT in FireDAC.Phys.IBCli.hpp.
3) Try to #IFDEF USHORT (and similar types), because they are are used just internaly by FireDAC InterBase driver.

--
With best regards,
Dmitry
John MacDonald

Posts: 179
Registered: 3/22/98
Re: FireDAC ambiguity error ? USHORT  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 30, 2016 6:17 AM   in response to: Dmitry Arefiev in response to: Dmitry Arefiev
Hello Dmitry:

Yes, I am working with C++ Builder XE6
I will look into the #2 and #3 solutions below.

Upgrading to berlin would mean that I would have to setup the BDE in berlin.
As I am migrating to FireDac; Berlin is a long term path.
I suspect that it would be very difficult to move the whole project to Berlin, getting the BDE to work, and then working in a new environment.

Just to be clear:
Am I to understand that in XE6 I will not be able to use Interbase and firedac together with vcl unless I can find a work around?

I hope I can figure this out. I'll keep you posted.

John

Dmitry Arefiev wrote:
I believe you are using C++ Builder ? There is not much what you can do:
1) Upgrade to Berlin.
2) Try to rename FireDAC USHORT (and similar types) to ISC_USHORT in FireDAC.Phys.IBCli.hpp.
3) Try to #IFDEF USHORT (and similar types), because they are are used just internaly by FireDAC InterBase driver.

--
With best regards,
Dmitry

--
JMAC out
John MacDonald

Posts: 179
Registered: 3/22/98
Re: FireDAC ambiguity error ? USHORT  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 30, 2016 7:06 AM   in response to: Dmitry Arefiev in response to: Dmitry Arefiev
2) Try to rename FireDAC USHORT (and similar types) to ISC_USHORT in FireDAC.Phys.IBCli.hpp.

There is already a type defined as ISC_USHORT in this .hpp file.

When I make the change in the hpp file will it automatically make the change in my code or is my code using a precompiled header?


3) Try to #IFDEF USHORT (and similar types), because they are are used just internaly by FireDAC InterBase driver.

--
With best regards,
Dmitry

--
JMAC out
John MacDonald

Posts: 179
Registered: 3/22/98
Re: FireDAC ambiguity error ? USHORT  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 30, 2016 7:09 PM   in response to: John MacDonald in response to: John MacDonald
Renaming the types has satisfied the compiler.

There are many references in a datamodule that reference a form to adjust the visible section of a grid.

Changing the names of these types allows the compiler to forge through, but, admittedly, I'm not sure what to expect the consequences to be for the project.

Thank you for your help.

John

Edited by: John MacDonald on Dec 30, 2016 10:09 PM
Dmitry Arefiev

Posts: 1,406
Registered: 12/7/03
Re: FireDAC ambiguity error ? USHORT  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 3, 2017 11:29 PM   in response to: John MacDonald in response to: John MacDonald
Changing the names of these types allows the compiler to forge through, but, admittedly, I'm not sure what to expect the consequences to be for the project.

In general, no consequences. These type are used only internally by FrieDAC InterBase driver, they are not used in FireDAC public API.

--
With best regards,
Dmitry
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02