I have an application that runs fine on Windows 7 but is failing on Server 2003. The line that fails is the third line below
_ConnectionPtr pConnection = NULL; :
This might help...
An ADO application does not run on down-level operating systems after you recompile it on a computer that is running Windows 7 SP 1 or Windows Server 2008 R2 SP 1 or that has KB983246 installed