KB950749 is breaking legacy DAO code

  • Thread starter Thread starter codewiz51
  • Start date Start date
C

codewiz51

Guest
After KB950749 was installed, we have some legacy DAO code that is failing.
We have found that we cannot create and append fields to tabledefs from our
C++ code. I have not tried the equivalent in VBA. I know that DAO is
obsolete, but we did not see the need to upgrade legacy applications.

I have extracted some working code that is in production. After KB950749 is
installed, the following code fails:

#import <C:\Program Files\Common Files\Microsoft Shared\DAO\dao360.dll>
rename("EOF", "EndOfFile")
CComPtr<DAO::_DBEngine> m_DBE;
DAO::DatabasePtr m_CurrDB;
DAO::_TableDefPtr tdfDestTable;
DAO::_FieldPtr fldNew;
m_DBE.CoCreateInstance(__uuidof(DAO::DBEngine));
m_CurrDB = m_DBE->CreateDatabase(_bstr_t(m_szMDFFile),
_bstr_t(DAO::dbLangGeneral),
_variant_t(DAO::dbVersion40));
tdfDestTable = m_CurrDB->CreateTableDef(_T("MyTable"));
// DAO error 3421 occurs here after KB is installed
fldNew = tdfDestTable->CreateField(_T("MyField"), DAO::dbText, 12);

I have a complete console application documented at
http://codewiz51.blogspot.com. (This is not an advertisement for my blog,
the app is just too long for inclusion in this message.)

If this is not posted to the correct forum, please let me know where I might
post the problem.

Thanks,
code
 
Re: KB950749 is breaking legacy DAO code

Free unlimited installation and compatibility support is available for
Windows XP, but only for Service Pack 3 (SP3), until 14 Apr-09. Chat and
e-mail support is available only in the United States and Canada.

• US:
http://support.microsoft.com/oas/default.aspx?ln=en-us&prid=11273&gprid=522131

• CA:
http://support.microsoft.com/oas/default.aspx?ln=en-ca&prid=11273&gprid=522131

• UK:
http://support.microsoft.com/oas/default.aspx?ln=en-gb&prid=11273&gprid=522131

• AU:
http://support.microsoft.com/oas/default.aspx?ln=en-au&prid=11273&gprid=522131

• Other: http://support.microsoft.com/oas/default.aspx?gprid=1173 | select
Windows XP | select Windows XP Service Pack 3
--
~Robear Dyer (PA Bear)
MS MVP-IE, Mail, Security, Windows Desktop Experience - since 2002
AumHa VSOP & Admin http://aumha.net
DTS-L http://dts-l.net/

codewiz51 wrote:
> After KB950749 was installed, we have some legacy DAO code that is
> failing.
> We have found that we cannot create and append fields to tabledefs from
> our
> C++ code. I have not tried the equivalent in VBA. I know that DAO is
> obsolete, but we did not see the need to upgrade legacy applications.
>
> I have extracted some working code that is in production. After KB950749
> is
> installed, the following code fails:
>
> #import <C:\Program Files\Common Files\Microsoft Shared\DAO\dao360.dll>
> rename("EOF", "EndOfFile")
> CComPtr<DAO::_DBEngine> m_DBE;
> DAO::DatabasePtr m_CurrDB;
> DAO::_TableDefPtr tdfDestTable;
> DAO::_FieldPtr fldNew;
> m_DBE.CoCreateInstance(__uuidof(DAO::DBEngine));
> m_CurrDB = m_DBE->CreateDatabase(_bstr_t(m_szMDFFile),
> _bstr_t(DAO::dbLangGeneral),
> _variant_t(DAO::dbVersion40));
> tdfDestTable = m_CurrDB->CreateTableDef(_T("MyTable"));
> // DAO error 3421 occurs here after KB is installed
> fldNew = tdfDestTable->CreateField(_T("MyField"), DAO::dbText, 12);
>
> I have a complete console application documented at
> http://codewiz51.blogspot.com. (This is not an advertisement for my blog,
> the app is just too long for inclusion in this message.)
>
> If this is not posted to the correct forum, please let me know where I
> might
> post the problem.
>
> Thanks,
> code
 
Re: KB950749 is breaking legacy DAO code

cf: http://support.microsoft.com/kb/950749

> For home users, no-charge support is available by calling 1-866-PCSAFETY in the United States and
> Canada or by contacting your local Microsoft subsidiary
> <snip>
> You can also obtain instant access to unlimited no-charge e-mail support or to unlimited individual
> chat support by visiting the following Microsoft Web site:
> http://support.microsoft.com/oas/default.aspx?&prid=7552 (http://support.microsoft.com/oas/default.aspx?&prid=7552)
> For enterprise customers, support for security updates is available through your usual support
> contacts.


Please report this issue.

MowGreen [MVP 2003-2008]
===============
*-343-* FDNY
Never Forgotten
===============



codewiz51 wrote:

> After KB950749 was installed, we have some legacy DAO code that is failing.
> We have found that we cannot create and append fields to tabledefs from our
> C++ code. I have not tried the equivalent in VBA. I know that DAO is
> obsolete, but we did not see the need to upgrade legacy applications.
>
> I have extracted some working code that is in production. After KB950749 is
> installed, the following code fails:
>
> #import <C:\Program Files\Common Files\Microsoft Shared\DAO\dao360.dll>
> rename("EOF", "EndOfFile")
> CComPtr<DAO::_DBEngine> m_DBE;
> DAO::DatabasePtr m_CurrDB;
> DAO::_TableDefPtr tdfDestTable;
> DAO::_FieldPtr fldNew;
> m_DBE.CoCreateInstance(__uuidof(DAO::DBEngine));
> m_CurrDB = m_DBE->CreateDatabase(_bstr_t(m_szMDFFile),
> _bstr_t(DAO::dbLangGeneral),
> _variant_t(DAO::dbVersion40));
> tdfDestTable = m_CurrDB->CreateTableDef(_T("MyTable"));
> // DAO error 3421 occurs here after KB is installed
> fldNew = tdfDestTable->CreateField(_T("MyField"), DAO::dbText, 12);
>
> I have a complete console application documented at
> http://codewiz51.blogspot.com. (This is not an advertisement for my blog,
> the app is just too long for inclusion in this message.)
>
> If this is not posted to the correct forum, please let me know where I might
> post the problem.
>
> Thanks,
> code
 
RE: KB950749 is breaking legacy DAO code

Code - can you tell me if compacting your database has an effect on the
failure?

Thanx
Lee

"codewiz51" wrote:

> After KB950749 was installed, we have some legacy DAO code that is failing.
> We have found that we cannot create and append fields to tabledefs from our
> C++ code. I have not tried the equivalent in VBA. I know that DAO is
> obsolete, but we did not see the need to upgrade legacy applications.
>
> I have extracted some working code that is in production. After KB950749 is
> installed, the following code fails:
>
> #import <C:\Program Files\Common Files\Microsoft Shared\DAO\dao360.dll>
> rename("EOF", "EndOfFile")
> CComPtr<DAO::_DBEngine> m_DBE;
> DAO::DatabasePtr m_CurrDB;
> DAO::_TableDefPtr tdfDestTable;
> DAO::_FieldPtr fldNew;
> m_DBE.CoCreateInstance(__uuidof(DAO::DBEngine));
> m_CurrDB = m_DBE->CreateDatabase(_bstr_t(m_szMDFFile),
> _bstr_t(DAO::dbLangGeneral),
> _variant_t(DAO::dbVersion40));
> tdfDestTable = m_CurrDB->CreateTableDef(_T("MyTable"));
> // DAO error 3421 occurs here after KB is installed
> fldNew = tdfDestTable->CreateField(_T("MyField"), DAO::dbText, 12);
>
> I have a complete console application documented at
> http://codewiz51.blogspot.com. (This is not an advertisement for my blog,
> the app is just too long for inclusion in this message.)
>
> If this is not posted to the correct forum, please let me know where I might
> post the problem.
>
> Thanks,
> code
 
Back
Top