FIX: Error "Undefined Function 'xxxxx' in Expression"

ID: Q189448

The information in this article applies to:

SYMPTOMS

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.

CAUSE

This behavior occurs when the following conditions are true:

The behavior occurs because of a bug in the Visual Basic 5.0 run-time library, the Msvbvm50.dll file, version 05.00.4319 (Service Pack 2 or Service Pack 3). The bug does not show up unless Vbajet32.dll is version 5.0.7122 or later.

RESOLUTION

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.7122 with file version 3.0.6908 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:

   http://www.microsoft.com/data/mdac15.htm

NOTE: After you replace the Vbajet32.dll file with the 3.0.6908 version, you need to reboot the Web server.

STATUS

This has been fixed in Visual Basic version 6.0.

MORE INFORMATION

Steps to Reproduce Behavior

1. Stop the Web service, and then restart it.

2. 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.

3. Create two .asp pages. Name one test1.asp and name the second one
   Test2.asp.

4. 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.

5. 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")

6. Browse the first page, Test1.asp, everything works fine.

7. Browse the second page, Test2.asp, everything works fine.

8. Return to the first page, Test1.asp, and the error occurs.

Additional query words: kbfixvb600 kbado

Keywords          : mdacMisc 
Version           : WINDOWS:1.5; WINNT:3.0,4.0
Platform          : WINDOWS winnt
Issue type        : kbprb

Last Reviewed: October 22, 1998