ADO error (80004003) on 1 machine



We have a C++ application developed using .NET 2003 with access to
Microsoft Access. It was working fine for a lot of machines until
recently on one of our customer's machine. It failed during the call to
CreateInstance().

Error: Code: = 80004003
Source =
Description =
Input = Provider=Microsoft.Jet.OLEDB.4.0:Data Source =
C:\Documents and Settings\tester1\Application Data\TestDB\testdb.mdb

I have the customer run the Microsoft Component Checker and he is
running
MDAC 2.8 SP 1 for Windows XP Service Pack 2 which is the same as what I
was running.

Here's the code snippet:

inline void TESTHR(HRESULT x) {if FAILED(x)
_com_issue_error(x);};

ADODB::_ConnectionPtr m_pConn;
_CatalogPtr m_pCatalog;


::CoInitialize(NULL);
m_pConn = NULL;
m_pCatalog = NULL;
m_pCatalog.CreateInstance(__uuidof(Catalog));

LPTSTR lpstrConnection =
_T("Provider=Microsoft.Jet.OLEDB.4.0;DataSource=xxx.mdb");

HRESULT hr = S_OK;

TESTHR(hr = m_pConn.CreateInstance(__uuidof(ADODB::Connection)));

if(_tcscmp(lpstrConnection, _T("")) != 0)
m_strConnection = lpstrConnection;

try
{
m_pConn->Open(lpstrConnection, "", "", NULL);

m_pCatalog->PutActiveConnection(variant_t((IDispatch
*)m_pConn));
//m_pCatalog->PutActiveConnection(_bstr_t(lpstrConnection));
return true;
}
catch(_com_error &e)
{
dump_com_error(e);
return false;
}

Any tips or pointers on resolving the problem will be greatly
appreciated.

Thanks!
ML

.



Relevant Pages

  • Re: Problem with Standard Functions
    ... Are they all sharing the same database, Mark? ... Doug Steele, Microsoft Access MVP ... > As the machines acted up I removed library references which initially ...
    (microsoft.public.access.formscoding)
  • Re: Problem with Standard Functions
    ... > Are they all sharing the same database, Mark? ... I think I tested that on one of the machines, but will again when the users ... >> Microsoft Access 10.0 Object Library ...
    (microsoft.public.access.formscoding)
  • Custom view is not working
    ... Following is my code snippet of one of my ... filterNode = objRoot.insertBefore(newNode, ... This code is working fine on all of our machines (with clean machines ... My addin is VSTO addin for office 2003 in VB2005. ...
    (microsoft.public.outlook.program_vba)
  • Developer CD - 2003 compatibility of Access 2000
    ... My organisation is currently using Microsoft Access 2000. ... We wish to deploy some databases on machines that do not have Access ... installed using the runtime version capability. ...
    (microsoft.public.access.gettingstarted)
  • Re: Exceptional Error - Custom Menus deleted at startup of Access
    ... be making this kind of problems then why other machines are NOT generating ... this error in Microsoft Access 2000 ... It is possible that the updates are not able to get installed correctly on ... Edmonton, Alberta Canada ...
    (microsoft.public.access.formscoding)