Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved.
Terms
of Use |
Trademarks
Article ID: 189448 - Last Review: June 30, 2006 - Revision: 3.4
FIX: Error "Undefined function 'xxxxx' in expression"
This article was previously published under Q189448
When you use an Active Server Pages (.asp) page and ActiveX Data Objects
(ADO) to open a recordset from a query in a Microsoft Access database,
which contains any intrinsic functions (for example, Month(), Left(),
etc.), the following error may occur:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC Microsoft Access 97 Driver] Undefined function
'xxxxx' in expression.
This behavior occurs when the following conditions are true:
- The Vbajet32.dll file is version 5.0.0.7122 (ships with Visual C++ 5.0, Visual Studio Service Pack 2 and Service Pack 3) or later (MDAC 2.0
currently ships with version 6.1.8167).
- The Visual Basic 5.0 run-time library is version 05.00.4319 (Service
Pack 2 or Service Pack 3)
- The Visual Basic 5.0 run-time library is loaded into memory. In essence,
a Visual Basic component (compiled after Service Pack 2 or Service Pack
3) has been loaded into memory.
The behavior occurs because of a bug in the Visual Basic 5.0 run-time
library, the Msvbvm50.dll file, version 5.1.43.19 (Service Pack 2 or
Service Pack 3). The bug does not show up unless Vbajet32.dll is version
5.0.0.7122 or later.
This bug has been fixed in the Visual Basic 6.0 run-time library. If you
have Visual Basic 6.0 installed, recompile your Visual Basic 5.0 components
in Visual Basic 6.0. If you do not have Visual Basic 6.0 installed, you can
replace the Vbajet32.dll file version 5.0.0.7122 with file version 3.0.0.6098 that ships with Microsoft Data Access Components (MDAC) version 1.5. The file can be downloaded as a part of the MDAC 1.5 install from the following Web site:
NOTE: After you replace the Vbajet32.dll file with the 3.0.0.6098 version, you need to reboot the Web server.
This has been fixed in Visual Basic version 6.0.
Steps to reproduce the behavior
- Stop the Web service, and then restart it.
- Create a Visual Basic 5.0 Service Pack 2 or later project. Create an
ActiveX .dll with one class module and name it Csimple and name the
project Test. Save the project and compile it into the .dll file.
- Create two .asp pages. Name one test1.asp and name the second one
Test2.asp.
- On the first page, create a connection to a Microsoft Access 97 database
by means of ADO and create a recordset that prints back to the page with
the following SQL statement:
SELECT Left([fieldname],1) FROM [table]
NOTE: [table] is a table in the database ane [fieldname] is a field in
that table.
- On the second page, create an object reference to the .dll file that you
created in step 2. The syntax would be something like the following
line:
Set obj = Server.CreateObject("Test.CSimple")
- Browse the first page, Test1.asp, everything works fine.
- Browse the second page, Test2.asp, everything works fine.
- Return to the first page, Test1.asp, and the error occurs.
APPLIES TO
- Microsoft Data Access Components 2.0
- Microsoft Data Access Components 2.5
- Microsoft Data Access Components 2.6
- Microsoft Active Server Pages 4.0
- Microsoft ActiveX Data Objects 1.5
- Microsoft Internet Information Server 4.0
| kbbug kbfix kbmdacnosweep kbvbp600fix KB189448 |
Community Feedback System
Very often, it takes hours to solve a problem. Very often, you've looked high
and low, and have tried a lot of solutions. When you finally found it, chances
are, it was because someone else helped you. Here's your chance to give back.
Use our community feedback tool to let others know what worked for you and what
didn't.
Please also understand that the community feedback system is not warranted to be
correct, it's simply a system that we've built to let people try and help each
other. If something in a feedback response doesn't make sense to you, or you're
not comfortable making changes that the feedback talks about (like registry
edits), please consult a professional.
Thank you for using kbAlertz.com Feedback System.
-- Scott Cate