Getting the replica ID of Access database using DAO
<p>I've recently ported an MFC project form VS6 to VS2005. The VS6 project linked ddao35d.lib (DAO 3.5) which is no longer compatible with the 'new' MFC used in VS2005. To get around this I'm now including  afxdao.h and changing my database classes from <code>CdbDatabase</code> to  <code>CDaoDatabase</code> as recommended by other posts : -</p>

<p><a href="http://www.experts-exchange.com/Programming/Languages/CPP/Q_22465486.html" rel="nofollow">http://www.experts-exchange.com/Programming/Languages/CPP/Q_22465486.html</a></p>

<p>However, there was a member function in <code>CdbDatabase</code> called <code>GetReplicaID()</code> which is no longer in <code>CDaoDatabase</code>. Does anyone know how to get the replica ID of an Access database using the <code>CDaoDatabase</code> class or otherwise?</p>

<p>Here are the important exerpts from that post: -</p>

<p>"As of Visual C++ .NET, the Visual C++ environment and wizards no longer support DAO (although the DAO classes are included and you can still use them). Microsoft recommends that you use OLE DB Templates or ODBC for new projects. You should only use DAO in maintaining existing applications.</p>

<p>The DAO MFC libraries, including ddao35d.lib, are part of PlatformSDK and are not compatible with the new MFC. You are expected to #include  and it will link daouuid.lib." </p>

<p>...</p>

<p>"Adding the  and daouuid.lib was the trick.  PLUS:  changing the declaration of CdbLastOLEError   TO   CDaoErrorInfo.   The CdbLastOLEError is still in , but apparently no longer in the ddao35.lib.   Changing to CDaoErrorInfo and linking with the addition of daouuid.lib has corrected the linker error."</p>
