Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Syntax error doing query on LDAP

Author  Topic 

snufse
Constraint Violating Yak Guru

469 Posts

Posted - 2010-01-11 : 11:31:49
Maybe this is not the right forum, but I get syntax error in LDAP query:


SELECT cn
FROM 'LDAP://10.xx.x.3/CN=Users,DC=Vecelliogroup,DC=COM'
WHERE objectClass='Group' and CN='Domain Useres'


Msg 102, Level 15, State 1, Line 2
Incorrect syntax near 'LDAP://10.xx.x.3/CN=Users,DC=Vecelliogroup,DC=COM'.


visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-01-11 : 11:34:54
can you explain what LDAP is? anyways try below:-


SELECT cn
FROM [LDAP://10.xx.x.3/CN=Users,DC=Vecelliogroup,DC=COM]
WHERE objectClass='Group' and CN='Domain Useres'
Go to Top of Page

snufse
Constraint Violating Yak Guru

469 Posts

Posted - 2010-01-11 : 11:44:24
see:

http://www.rlmueller.net/SQLSyntax.htm

Go to Top of Page

snufse
Constraint Violating Yak Guru

469 Posts

Posted - 2010-01-11 : 11:46:43

SELECT cn
FROM [LDAP://10.xx.x.3/CN=Users,DC=Vecelliogroup,DC=COM]
WHERE objectClass='Group' and CN='Domain Useres'

Getting error:

Invalid object name 'LDAP://10.xx.x.3/CN=Users,DC=Vecelliogroup,DC=COM'.
Go to Top of Page

vijayisonly
Master Smack Fu Yak Hacker

1836 Posts

Posted - 2010-01-11 : 12:06:00
I can't provide a solution coz I dont know about LDAPs..but maybe one of these links will help..

http://www.ldapsoft.com/ldapselectstatments.html
http://www.ldapsoft.com/selectstatmentsexample.html
Go to Top of Page

yosiasz
Master Smack Fu Yak Hacker

1635 Posts

Posted - 2010-01-11 : 12:38:57
try this also...http://sql.dzone.com/news/querying-active-directory-thro

http://en.wikipedia.org/wiki/Lightweight_Directory_Access_Protocol
The Lightweight Directory Access Protocol, or LDAP ,is an application protocol for querying and modifying directory services (Active Directory) running over TCP/IP.[1]


<><><><><><><><><><><><><><><><><><><><><><><><><>
If you don't have the passion to help people, you have no passion
Go to Top of Page
   

- Advertisement -