Listing B
  // Open ViaDB connection to SQLOLEDB located on a remote server
  hr = m_iADOCEConn->Open(TEXT("Provider=ViaDB; ViaDB Remote Provider=SQLOLEDB; ViaDB Remote Server=KHALID; Data Source=(local); Initial Catalog=test; User ID=shake; Password=shake"), TEXT(""), TEXT(""), adOpenUnspecified);
  ASSERT(SUCCEEDED(hr));

  // Associate the Connection object with the Recordset
  m_varConn.pdispVal = m_iADOCEConn;
  m_varConn.vt = VT_DISPATCH;