| try{ if (!celt) celt = 1; for (ULONG i = 0; i < celt; i++){ if (m_pRecordset->EndOfFile== VARIANT_TRUE) break; _bstr_t bstrText= (LPCTSTR)g_GetValueString( m_pRecordset->Fields->Item[(LPCTSTR)m_pDataType->m_strAutoCompleteField]->Value); if(bstrText.length()>0){ rgelt[i] = OLESTRDUP(bstrText); if (pceltFetched) *pceltFetched++; } m_pRecordset->MoveNext(); } if (i == celt) hr = S_OK; } catch(_com_error &e) { ESErrPrintProviderError(g_connection); ESErrPrintComError(e); return e.Error(); } return hr; } STDMETHODIMP CEnumDataType::Skip(ULONG celt) { if(m_pRecordset==NULL) return OLE_E_BLANK; try{ m_pRecordset->Move(celt,(long)adBookmarkCurrent); } catch(_com_error &e) { ESErrPrintProviderError(g_connection); ESErrPrintComError(e); return e.Error(); } return S_OK; } STDMETHODIMP CEnumDataType::Reset(void) { if(m_pRecordset==NULL) return OLE_E_BLANK; try{ m_pRecordset->Requery(adCmdUnknown); if(m_pRecordset->BOF==VARIANT_FALSE) m_pRecordset->MoveFirst(); } catch(_com_error &e) |