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 2000 Forums
 SQL Server Development (2000)
 Update Openquery...

Author  Topic 

danielc
Starting Member

49 Posts

Posted - 2007-03-01 : 15:32:57
Hello folks,

Thanks in advance for all your help. I am a little confused in regards to being able to use UPDATE with Openquery... The following example shows what it is that I am trying to accomplish:

update openquery
(ADSI,
'SELECT givenName, SN, employeeID, displayName
FROM ''LDAP://server.local''
WHERE displayName=''billy bob''')
set employeeID = 1234

When I execute query i get the following error:

Server: Msg 7390, Level 16, State 1, Line 1
The requested operation could not be performed because the OLE DB provider 'ADsDSOObject' does not support the required transaction interface. OLE DB error trace [OLE/DB Provider 'ADsDSOObject' IUnknown::QueryInterface returned 0x80004002].

Why doesn't this work? MSDN states that it should work, but it seems as though it doesn't. Unless I am doing something wrong.

Thank you,

Dan

rlaubert
Yak Posting Veteran

96 Posts

Posted - 2007-03-01 : 15:54:57
Missing a table name to update? Openquery is returing data, but the update doesn't have anyplace to update(no table).



Raymond Laubert
MCDBA, MCITP:Administration, MCT
Go to Top of Page

danielc
Starting Member

49 Posts

Posted - 2007-03-01 : 15:58:01
I'm terribly sorry folks for not adding that I am trying to update Active Directory with data from SQL...
Go to Top of Page

rcurrey
Starting Member

30 Posts

Posted - 2007-03-02 : 08:35:28
You might want to check the documentation on the ADSI provider to see if it supports distributed transactions. Although SQL Server supports this, it may or may not be supported by ADSI. If it is not supported, you could look at writing VB script or .net code to read the db and then write to AD.

Thanks,
Rich
Go to Top of Page
   

- Advertisement -