Page 1 of 1

Ambiguity in ukInsert between memdata and Data::db

Posted: Sat 07 Jun 2014 10:24
by claveljr
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

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

Posted: Wed 11 Jun 2014 07:36
by PavloP
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;
}