ADO error (80004003) on 1 machine
- From: mingleeshop@xxxxxxxxx
- Date: 25 Aug 2006 05:19:27 -0700
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
.
- Follow-Ups:
- Re: ADO error (80004003) on 1 machine
- From: Bob Barrows [MVP]
- Re: ADO error (80004003) on 1 machine
- From: Bob Barrows [MVP]
- Re: ADO error (80004003) on 1 machine
- Prev by Date: Re: parsing xml
- Next by Date: Re: Timing Rescordset
- Previous by thread: Re: VB6 Access97
- Next by thread: Re: ADO error (80004003) on 1 machine
- Index(es):
Relevant Pages
|
|