Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

One of the common build errors we encounter is the following:

Code Block
<!--

...


VBP: BayerTC.vbp

...


ERRNUM: CS0102: The type 'TrueOleDBGrid70.TDBGrid' already contains a definition for 'FetchRowStyle'

...


NETSRC: C:\gmClients\AmerisourceBergen\proj\deploy\BayerTC_std_csh\externs\TrueOleDBGrid70.cs@986

...


public event TrueDBGridEvents_FetchRowStyleEventHandler FetchRowStyle;

...


-->

This occurs when a COM API has a naming collision between two members in a given class.

Most frequently, one of the two members is an event because in COM, the inbound interface (i.e., event handlers) are in a different class from the outbound interface (i.e., automation) so there was no clash. But when we merge these two interfaces into a stub class, we get an a clash.

The typical fix is to find the clashing handler and change the netname netName attribute by adding "Event", like this:

 

1
2
3
<event id="FetchRowStyle" netName="FetchRowStyleEvent" <--- changed
 
netHandler="AxTrueOleDBGrid70.TrueDBGridEvents_FetchRowStyleEventHandler" netArgs="AxTrueOleDBGrid70.TrueDBGridEvents_FetchRowStyleEvent">

 

...