Page 1 of 1

DBAccess Ambiguity

Posted: Sat 22 May 2010 06:25
by wjm4
I am getting a compiler ambiguity error when I include both Unidac components and Windows Service Manager structures in my application.

The current error is:
[BCC32 Error] SCMCLASS.h(16): E2015 Ambiguity between 'SC_HANDLE' and 'Dbaccess::SC_HANDLE'

Since Dbaccess is used by unidac, I did not know if you had encountered the problem before. Thanks in advance.

Posted: Tue 25 May 2010 12:37
by dkittell
Just a quick thought, are you creating a new handle or are you attempting to use the same one?

Posted: Tue 25 May 2010 12:54
by wjm4
I am creating a new handle.

Posted: Tue 25 May 2010 15:32
by bork
Hello

You should use the Dbaccess::SC_HANDLE type (in the Dbaccess namespace) to use the SC_HANDLE type from UniDAC. And use the ::SC_HANDLE type to use the SC_HANDLE type from the Windows Service Manager structures.

For example:

Code: Select all

{
  ::SC_HANDLE             hWindowsServiceManager;
  Dbaccess::SC_HANDLE     hUniDACHandle;

}