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 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.
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
I like thePermissions Analyzer because it enables me to see WHO has permissions to do WHAT at a glance. When you launch this tool it analyzes a users effective NTFS permissions for a specific file or folder, and takes into account network share access, then displays the results in a nifty desktop dashboard!
Think of all the frustration that this free SolarWinds utility saves when you are troubleshooting authorization problems for user’s access to a resource. Give this permissions monitor a try – it’s free!
Example of Script – Table Does Not Exist
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’ "
I 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
Do Until objRecordSet.EOF
Wscript.Echo "Printer Name: " & objRecordSet.Fields("printerName").Value
Wscript.Echo "Server Name: " & objRecordSet.Fields("serverName").Value
‘ End of Example 80040E37
See More Windows Update Error Codes 8004 Series
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.
Do you need additional help?
- For interpreting the WSH messages check Diagnose 800 errors.
- For general advice try my 7 Troubleshooting techniques.
- See master list of 0800 errors.
- Codes beginning 08004…
- Codes beginning 08005…
- Codes beginning 08007…
- Codes beginning 0800A…
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:
If you like this page then please share it with your friends