|
Value of my select string is: select sAMAccountName, displayName, title, userAccountControl from 'LDAP://DC=Vecelliogroup,DC=COM' where objectCategory = 'User' and title <> ' ' and (userAccountControl <> '66050' and userAccountControl <> '514') and sAMAccountName like '%vg%'
Getting error:
System.Data.OleDb.OleDbException: 'ADSDSOObject' failed with no error message available, result code: DB_E_ERRORSINCOMMAND(0x80040E14).
Now, if I leave out the "title" and the "sAMAccountName" from my select query it works fine. I am trying to get records where the "title" is not empty and name matches my prefix.
snufsePosted Feb 11, 2010, 1:04 PM
1. disregard records where "title" is empty
2. use the LIKE keyword on "sAMAccountName"
Besides this everything is working fine. I need help with my sql syntax that is not working. Thank you.
Lalit MPosted Feb 11, 2010, 11:12 AM
http://www.dotnet247.com/247reference/msgs/1/9450.aspx