Ambiguity in ukInsert between memdata and Data::db

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
claveljr
Posts: 4
Joined: Sat 30 Mar 2013 08:40

Ambiguity in ukInsert between memdata and Data::db

Post by claveljr » Sat 07 Jun 2014 10:24

Hi
i get a error when I am using TUniUpdateSQL with MyDac.
[BCC32 Error] Clientes.cpp(402): E2015 Ambiguity between 'Memdata::ukInsert' and 'Data::Db::ukInsert'
Full parser context
Clientes.cpp(376): parsing: void _fastcall TClientesFrm::ClienteQryBeforePost(Data::Db::TDataSet *)

I found in MemData.hpp file (C:\Program Files (x86)\Devart\UniDAC for RAD Studio XE2\Include\Win32) a enum called TUpdateRecKind.


I can't change the enum in MemData.hpp, maybe a process is using the file.

what can i do?

thanks

PavloP
Devart Team
Posts: 149
Joined: Fri 24 Jan 2014 12:33

Re: Ambiguity in ukInsert between memdata and Data::db

Post by PavloP » Wed 11 Jun 2014 07:36

To solve the problem, specify explicitly the namespace before the ukInsert constant name, for instance:

Code: Select all

#include <Data.DB.hpp>
#include <MemData.hpp>
. . .
{
  TUpdateKind  v1;
  TUpdateRecKind v2;

  v1 = Data::Db::ukInsert;
  v2 = Memdata:: ukInsert;
}

Post Reply