Computer Performance, Windows 2003, Exchange 2003, Logon Scripts

Code 80040E37 - Error: Table does not exist

Troubleshooting Code Error 80040E37 - Table does not exist

Error 80040E37 literally means there is something wrong with the LDAP domain database table.  However, in practical terms, most likely there is a syntax error in the LDAP:/domain line.

Introduction to Error Code 80040E37

This error code, 80040E37 occurs when you execute a VBScript.  You are probably using a WSH method to connect to LDAP.  My guess is that there is a mistake with the speech marks.

The Symptoms you getTroubleshooting Code Error 80040E37 - Table does not exist

The script does not manipulate the Active Directory object as you had hoped, instead you get a Windows Script Host error message. The probably scenario is that you are trying to manipulate an LDAP object. 

The Cause of Code Error 80040E37

Incorrect reference to the domain in an LDAP command.  In this context 'Table' refers to a domain in line such as: LDAP://domain.

Variations:
One or more errors occurred during processing of command. Error 80040E14
Invalid Syntax. Error 800401E4

The Solution to Code Error 80040E37

Check the Line in your script that references the 'Provider'.  If necessary, work back for previous LDAP occurrences.

Char 1: often lies! it just means that the whole line will not execute. In the case of runtime errors you can use this work around.  Add this line: On Error Resume Next

  ‡

Example of Script

Note the error is actually on line 15: it should be 'LDAP://DC=CP,DC=Com'.  I could not get it to work with the strDomain variable; until Bruce M. kindly wrote in with the following correction.  If there is a message here it is pay careful attention to the single and double quotes.

Be advised that your error will be different, just apply the general principels and try different arrangements of speech marks.

Mistake line 15 & " 'LDAP://' & strDomain where objectClass='printQueue'" 

Correct line 15 to read : & " 'LDAP://" & strDomain & " ' where objectClass='printQueue' "

 

VBScript for error codesI just could not get my script to work..... Until I mastered binding to LDAP.

 

' Get Domain name from RootDSE object.
Set objRootDSE = GetObject("LDAP://RootDSE")
strDomain = objRootDSE.Get("DefaultNamingContext")

WScript.Echo strDomain ' This is Extra line Guy put in to test


Const ADS_SCOPE_SUBTREE = 2
Set objConnection = CreateObject("ADODB.Connection")
Set objCommand = CreateObject("ADODB.Command")
objConnection.Provider = "ADsDSOObject"
objConnection.Open "Active Directory Provider"
Set objCommand.ActiveConnection = objConnection
objCommand.CommandText = "Select printerName, serverName from " _
& " 'LDAP://' & strDomain  where objectClass='printQueue'"
objCommand.Properties("Page Size") = 1000
objCommand.Properties("Timeout") = 30
objCommand.Properties("Searchscope") = ADS_SCOPE_SUBTREE
objCommand.Properties("Cache Results") = False
Set objRecordSet = objCommand.Execute
objRecordSet.MoveFirst
Do Until objRecordSet.EOF
Wscript.Echo "Printer Name: " & objRecordSet.Fields("printerName").Value
Wscript.Echo "Server Name: " & objRecordSet.Fields("serverName").Value
objRecordSet.MoveNext
Loop

' End of Example 80040E37

 

 

Guy Recommends: WMI Monitor and It's Free!Solarwinds WMI Monitor

Windows Management Instrumentation (WMI) is one of the hidden treasures of Microsoft operating systems.  Fortunately, Solarwinds have created the WMI Monitor so that you can examine these gems of performance information for free.  Take the guess work out of which WMI counters to use for applications like Microsoft Active Directory, SQL or Exchange Server.

Download your free copy of WMI Monitor


Computer Training Software - Recommended Training VideosGuy Thomas recommends Computer Training Software

Their topics and material are ideal for getting you started with VBScript.  The videos are easy to follow and you can control the pace.  Try their free demo material and then see if you want to buy the full package. See more about VB Script Training CD.


Do you need extra help?

For interpreting the WSH messages check Diagnose 800 errors.

For general advice try my 7 Troubleshooting techniques

Give something back?

Would you like to help others?  If you have a good example of this error, then please email me, I will publish it with a credit to you:

 *


Google

Web  This website

Guy Recommends: SolarWinds Engineer's Toolset v10Engineer's Toolset v10

The Engineer's Toolset v10 provides a comprehensive console of utilities for troubleshooting computer problems.

There are so many good gadgets, it's like having free rein of a sweetshop. Thankfully the utilities are displayed logically: monitoring, discovery, diagnostic, and Cisco tools.  Download your copy of the Engineer's Toolset v 10

 

Home Copyright © 1999-2010 Computer Performance LTD All rights reserved.

Please report a broken link, or an error.