How to enable connection resource pooling with ATL/MSOLEDBSQL?
See the question and my original answer on StackOverflowThis is due to the AddProperty utility method that comes with the CDBPropSet tool class. You use VARIANT_TRUE which is the correct value for OLEDB but it forces the C++ compiler to use this overload because VARIANT_TRUE is a short:
bool AddProperty(DWORD dwPropertyID, short nValue, DBPROPOPTIONS propoptions);
So, just use a true C++ bool, like this:
dbinit[1].AddProperty(SSPROP_INIT_MULTISUBNETFAILOVER, true));
And the utility class will pass a VARIANT_TRUE...