![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Query length Limitations on Win2K Using "ADO" "Active Directory Provider" ... Error -2147217900 Hi all, I usually try to access my A/D using LDAP. However I thought hat I would give it a try using ADO in my HTA (VBScript) application... I seem to have run in to a limitation of the query length in my SELECT statement. I won't drive you nuts by posting my code, but suffice to say I have isolated it to the following: 1) With ADODB/ADsDSOObject /Active Directory Provider, you can't do a "SELECT * FROM ..." This produces the error "Item cannot be found in the collection..." I have tried this many ways, with/without quotes, etc. It seems to insist on a list of column names! Please tell me if I am wrong, this would solve the problem. 2) I can give it a long list of column names; it works fine on XP. However on W2K it croaks with the above error -2147217900. Maybe there is a DLL we can update to fix this problem? W2K support is a must-have...the client systems are at the latest update level. Many Thanks In Advance for any insights |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Query length Limitations on Win2K Using "ADO" "Active Directory Provider" ... Error -2147217900 "just say NO to PDF" <stingray_67@xxxxxx_spam.hotmail.com> wrote in message news:uLM76wt4JHA.2656@xxxxxx Quote: > Hi all, > I usually try to access my A/D using LDAP. However I thought hat I would > give it a try using ADO in my HTA (VBScript) application... > > I seem to have run in to a limitation of the query length in my SELECT > statement. > I won't drive you nuts by posting my code, but suffice to say I have > isolated it to the following: > > 1) With ADODB/ADsDSOObject /Active Directory Provider, you can't do a > "SELECT * FROM ..." > This produces the error "Item cannot be found in the collection..." > I have tried this many ways, with/without quotes, etc. It seems to insist > on a list of column names! > Please tell me if I am wrong, this would solve the problem. ADsPath. Using LDAP syntax you must specify the attributes by LDAP display name. Quote: > > 2) I can give it a long list of column names; it works fine on XP. However > on W2K it croaks with the above error -2147217900. > Maybe there is a DLL we can update to fix this problem? W2K support is a > must-have...the client systems are at the latest update level. > > Many Thanks In Advance for any insights I've used some long queries. Was there an error description? If you have a query that works on XP but not W2k, the difference must be the version of MDAC. I think the only fix would be to update MDAC. However, I would try using LDAP syntax before giving up. See this link: http://www.rlmueller.net/ADOSearchTips.htm All SQL syntax queries are converted to LDAP syntax under the covers, since that is the only syntax really supported by AD. I will try queries with long lists of attribute names and report back if I seem to encounter a limit. Also, unless you use special code, you should only retrieve single-values string attributes. Many attributes have syntaxes that will raise errors if you treat the return value as a string. Of course, this has nothing to do with the client OS. -- Richard Mueller MVP Directory Services Hilltop Lab - http://www.rlmueller.net -- |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| "ViewEntireForest": "Active Directory operation failed on . Thesupplied credential for | PowerShell | |||
| Vista not wotking with "My Computer" or "Control Panel", "Screen Saver" | Vista General | |||
| Active Directory "Log on to" restriction and Vista RDP | Vista General | |||
| Active "sync" should be renamed Active "Stinks" | Vista General | |||
| WM5 Sync with Vista "Windows Calender", "Contacts", and "Mail" | Vista General | |||