SurreyWebDesigner
asked on
Problem getting data from LDAP - Could not convert the data value due to reasons other than sign mismatch or overflow.
Hi Experts,
I'm trying to drag back some data using an LDAP connection in Query Analyzer.
The following sql ...
select personaltitle, givenname
from openquery(ADSI,
'select btpersonaltitle, givenname
from ''LDAP://myldapserver/ou=p eople,ou=x yz,o=ABC''
where workforceid = 12345')
Brings back the following error ...
Server: Msg 7346, Level 16, State 2, Line 1
Could not get the data of the row from the OLE DB provider 'ADsDSOObject'. Could not convert the data value due to reasons other than sign mismatch or overflow.
OLE DB error trace [OLE/DB Provider 'ADsDSOObject' IRowset::GetData returned 0x40eda: Data status returned from the provider: [COLUMN_NAME=givenname STATUS=DBSTATUS_E_CANTCONV ERTVALUE], [COLUMN_NAME=personaltitle STATUS=DBSTATUS_S_OK]].
I think this might be caused by the givenname coming back as an array but I'm afraid to say I don't know how to deal with it if it is. For the life of me I can't get this right - all I want is a single line to come back with the name and title of the person.
Can you help??
Many thanks in advance.
SWD
I'm trying to drag back some data using an LDAP connection in Query Analyzer.
The following sql ...
select personaltitle, givenname
from openquery(ADSI,
'select btpersonaltitle, givenname
from ''LDAP://myldapserver/ou=p
where workforceid = 12345')
Brings back the following error ...
Server: Msg 7346, Level 16, State 2, Line 1
Could not get the data of the row from the OLE DB provider 'ADsDSOObject'. Could not convert the data value due to reasons other than sign mismatch or overflow.
OLE DB error trace [OLE/DB Provider 'ADsDSOObject' IRowset::GetData returned 0x40eda: Data status returned from the provider: [COLUMN_NAME=givenname STATUS=DBSTATUS_E_CANTCONV
I think this might be caused by the givenname coming back as an array but I'm afraid to say I don't know how to deal with it if it is. For the life of me I can't get this right - all I want is a single line to come back with the name and title of the person.
Can you help??
Many thanks in advance.
SWD
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for your help on this. Although it means I'm a bit stuck moving forward I realise that this is probably what I need to do to get things fixed. Thanks again.
ASKER
I've been told by one of the guys working in the Active Directory team in our company that this response is expected because the data is being returned in an array.
So I thought it would be a reasonably straightforward thing to sort out (if you know what to do obviously!!)
Thanks
SWD