Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

0x80040E37 error during an ldap query 1

Status
Not open for further replies.

w1nd

Technical User
Aug 12, 2005
5
DE
Hello,
I'm making a script finding out if the mailbox size quotas are bigger than defaults. It says to me it's error 0x80040E37 - table does not exist. I want to find all private mailox stores that exist on the server and then, using the homeMDBBL property, iterate through their mailboxes and estimate their storage limits.
I'm using VBS. The script is run on the server.
My script (the "wrong" part of it):

Set objConn = CreateObject("ADODB.Connection")
objConn.Provider = "ADsDSOObject"
objConn.Open "Active Directory Provider"
Set objCommand = CreateObject("ADODB.Command")
Set objCommand.ActiveConnection = objConn
Set objRoot = GetObject("LDAP://myserver/RootDSE")
strNameContext = objRoot.Get("ConfigurationNamingContext")
strQuery = "<" & strNameContext & ">;(objectClass=msExchPrivateMDB);homeMDBBL;subTree"
objCommand.Commandtext = strQuery
objRecordSet = objCommand.Execute

I suppose there's something wrong with my rights, though I'm a local admin on the server.

PS. I DO know there was a similar thread on this forum about ASP, but it didn't really help me.
PPS. Yes, I AM a newb :(
 
>[tt]strQuery = "<" & strNameContext & ">;(objectClass=msExchPrivateMDB);homeMDBBL;subTree"[/tt]
Try this instead.
[tt]strQuery = "<LDAP://" & strNameContext & ">;(objectCategory=msExchPrivateMDB);homeMDBBL;subTree"
[/tt]
 
Didn't help, but thank you anyway :)
 
I've added the LDAP:// part to the query string. That's what the debugger says about its content:
strQuery
<LDAP://CN=Configuration,DC=e2kdewdfe1y,DC=sap,DC=corp>;(objectClass=msExchPrivateMDB);homeMDBBL;subTree
 
okay, at least members can see what you actually are working on with.
 
I've got it!!! A colleague helped me.
It should be
strQuery = "<LDAP://myserver" & strNameContext & ">;(objectCategory=msExchPrivateMDB);homeMDBBL;subTree
 
>[tt]strQuery = "<LDAP://myserver" & strNameContext & ">;(objectCategory=msExchPrivateMDB);homeMDBBL;subTree"[/tt]
[tt]strQuery = "<LDAP://myserver[red]/[/red]" & strNameContext & ">;(objectCategory=msExchPrivateMDB);homeMDBBL;subTree"[/tt]
 
That's what I've wanted to say. Anyway, thank you!!
 
Thanks w1nd for the good spirit and feedback. I know that's what you were intended to tell the forum. I too make typos all the time. It is just for the general audience. Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top