Is there any way to retrieve AD MultiValued Attributes using T-SQL?
These are the messages you get when you try:
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.
Data status returned from the provider:
[COLUMN_NAME=member STATUS=DBSTATUS_E_CANTCONVERTVALUE],
JBHi,
Welcome to use MSDN Managed Newsgroup!
From your descriptions, I understood you would like to know how to query
MultiValued attributes in Active Directory. If I have misunderstood your
concern, please feel free to point it out.
Based on my knowledge, there is a limitation on querying the Active
Directory which is that multivalued properties cannot be returned in the
result set to SQL Server. ADSI will read schema information from the LDAP
server that defines the structure and syntax of the classes and attributes
used by the server. If the attribute that is requested from the LDAP server
is defined in the schema as being multi-valued it cannot be returned in an
OPENQUERY statement.
It is typical for a directory server to enforce a server limitation on the
number of objects that will be returned for a given query. This is to
prevent denial-of-service attacks and network overloading.
Using ADSI as OLE DB Provider, it can participate in Distributed Query for
following possible scenarios:
- Joining Active Directory objects with SQL Server data.
- Updating SQL data from Active Directory objects.
- Creating three-way or four-way joins with other OLE DB Providers. For
example, Index Server, SQL Server, and Active Directory.
For more detailed information, please refer the article below
Distributed Query
http://msdn.microsoft.com/library/d...-us/adsi/adsi/d
istributed_query.asp
OLE DB Provider for Microsoft Directory Services
http://msdn.microsoft.com/library/d...-us/acdata/ac_8
_qd_12_94fn.asp
Thank you for your patience and cooperation. If you have any questions or
concerns, don't hesitate to let me know. We are always here to be of
assistance!
Sincerely yours,
Michael Cheng
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
========================================
=============
This posting is provided "AS IS" with no warranties, and confers no rights.|||Michael - Thank you for taking the time to reply to my question. I needed
such confirmation before start using DTS/VBScript to populate a set of
columns...
--
Juan B
"Michael Cheng [MSFT]" wrote:
> Hi,
> Welcome to use MSDN Managed Newsgroup!
> From your descriptions, I understood you would like to know how to query
> MultiValued attributes in Active Directory. If I have misunderstood your
> concern, please feel free to point it out.
> Based on my knowledge, there is a limitation on querying the Active
> Directory which is that multivalued properties cannot be returned in the
> result set to SQL Server. ADSI will read schema information from the LDAP
> server that defines the structure and syntax of the classes and attributes
> used by the server. If the attribute that is requested from the LDAP serve
r
> is defined in the schema as being multi-valued it cannot be returned in an
> OPENQUERY statement.
> It is typical for a directory server to enforce a server limitation on the
> number of objects that will be returned for a given query. This is to
> prevent denial-of-service attacks and network overloading.
> Using ADSI as OLE DB Provider, it can participate in Distributed Query for
> following possible scenarios:
> - Joining Active Directory objects with SQL Server data.
> - Updating SQL data from Active Directory objects.
> - Creating three-way or four-way joins with other OLE DB Providers. For
> example, Index Server, SQL Server, and Active Directory.
> For more detailed information, please refer the article below
> Distributed Query
> [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adsi/adsi/d[/ur
l]
> istributed_query.asp
> OLE DB Provider for Microsoft Directory Services
> [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/acdata/ac_8[/ur
l]
> _qd_12_94fn.asp
> Thank you for your patience and cooperation. If you have any questions or
> concerns, don't hesitate to let me know. We are always here to be of
> assistance!
>
> Sincerely yours,
> Michael Cheng
> Microsoft Online Partner Support
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ========================================
=============
> This posting is provided "AS IS" with no warranties, and confers no rights
.
>|||Hi Juan,
You are welcome!
If you have any questions or concerns on SQL Server next time, don't
hesitate to let me know. We are always here to be of assistance!
Sincerely yours,
Michael Cheng
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
========================================
=============
This posting is provided "AS IS" with no warranties, and confers no rights.|||Sorry to Jump on the thread but I am receiving the same issue while querying
the "Description" field from Active Directory. Is this too MULTIVALUE?
Many Thanks
Andy
Showing posts with label messages. Show all posts
Showing posts with label messages. Show all posts
Thursday, March 8, 2012
Sunday, February 19, 2012
ADO InfoMessage doesn't return all messages
I would like to return messages from a 3 'action' stored procedure to
the user of an Access front end via ADO. I've tried looping through
MyConnection.Errors within the InfoMessage event and this returns the
message I see in QA for each action if the user has only changed 1
record. However if the user first updates more than 1 record in Access
and then executes this stored procedure (via a command object) I still
get back only 1 message per action as opposed to 1 message per action
per record as I do in QA. MyConnection.Errors.Count always stays at 3
no matter how many records are updated, though in QA I get 3 * the
number of records messages. I can also reproduce this with print. QA
will display say 9 print messages for 3 records but ADO will only
display 3 messages, those for the first record in the batch.
I can load all the info into an output parameter but would like to use
InfoMessages to build 1 complete string for Msgbox.You might try adding SET NOCOUNT ON to the beginning of your procs. This
will suppress DONE_IN_PROC (including rowcounts) that can cause problems
with ADO application processing of resultsets and messages.
Hope this helps.
Dan Guzman
SQL Server MVP
"Steve" <morriszone@.hotmail.com> wrote in message
news:1110927775.827057.213060@.o13g2000cwo.googlegroups.com...
>I would like to return messages from a 3 'action' stored procedure to
> the user of an Access front end via ADO. I've tried looping through
> MyConnection.Errors within the InfoMessage event and this returns the
> message I see in QA for each action if the user has only changed 1
> record. However if the user first updates more than 1 record in Access
> and then executes this stored procedure (via a command object) I still
> get back only 1 message per action as opposed to 1 message per action
> per record as I do in QA. MyConnection.Errors.Count always stays at 3
> no matter how many records are updated, though in QA I get 3 * the
> number of records messages. I can also reproduce this with print. QA
> will display say 9 print messages for 3 records but ADO will only
> display 3 messages, those for the first record in the batch.
> I can load all the info into an output parameter but would like to use
> InfoMessages to build 1 complete string for Msgbox.
>
the user of an Access front end via ADO. I've tried looping through
MyConnection.Errors within the InfoMessage event and this returns the
message I see in QA for each action if the user has only changed 1
record. However if the user first updates more than 1 record in Access
and then executes this stored procedure (via a command object) I still
get back only 1 message per action as opposed to 1 message per action
per record as I do in QA. MyConnection.Errors.Count always stays at 3
no matter how many records are updated, though in QA I get 3 * the
number of records messages. I can also reproduce this with print. QA
will display say 9 print messages for 3 records but ADO will only
display 3 messages, those for the first record in the batch.
I can load all the info into an output parameter but would like to use
InfoMessages to build 1 complete string for Msgbox.You might try adding SET NOCOUNT ON to the beginning of your procs. This
will suppress DONE_IN_PROC (including rowcounts) that can cause problems
with ADO application processing of resultsets and messages.
Hope this helps.
Dan Guzman
SQL Server MVP
"Steve" <morriszone@.hotmail.com> wrote in message
news:1110927775.827057.213060@.o13g2000cwo.googlegroups.com...
>I would like to return messages from a 3 'action' stored procedure to
> the user of an Access front end via ADO. I've tried looping through
> MyConnection.Errors within the InfoMessage event and this returns the
> message I see in QA for each action if the user has only changed 1
> record. However if the user first updates more than 1 record in Access
> and then executes this stored procedure (via a command object) I still
> get back only 1 message per action as opposed to 1 message per action
> per record as I do in QA. MyConnection.Errors.Count always stays at 3
> no matter how many records are updated, though in QA I get 3 * the
> number of records messages. I can also reproduce this with print. QA
> will display say 9 print messages for 3 records but ADO will only
> display 3 messages, those for the first record in the batch.
> I can load all the info into an output parameter but would like to use
> InfoMessages to build 1 complete string for Msgbox.
>
Monday, February 13, 2012
ADO Application Name not showing up in SQL Server Profiler
I am using MS SQL Server 2005 and SQLOLEDB.1
I can't seem get to get my application name to show up for
SQL:BatchCompleted messages. It shows up in the SQL:BatchStarting,
SQL:StmtStarting and SQL:StmtCompleted events.
After the connection string is set, I append ";Application Name=MyApp".
Has anyone seen this? Am I missing something?"Isaac Alexander" <isaacNOSPAM@.goNOSPAMprocura.com> wrote in message
news:eucFm3ytGHA.3264@.TK2MSFTNGP03.phx.gbl...
>I am using MS SQL Server 2005 and SQLOLEDB.1
> I can't seem get to get my application name to show up for
> SQL:BatchCompleted messages. It shows up in the SQL:BatchStarting,
> SQL:StmtStarting and SQL:StmtCompleted events.
> After the connection string is set, I append ";Application Name=MyApp".
> Has anyone seen this? Am I missing something?
>
Please ignore this message. I'm still learning the 2005 SQL Profiler. I
started with the template and the SQL:BatchCompleted didn't include the
Application Name column. I added the stored procedure event with the
Application Name column, but it showed up blank on the SQL:BatchCompleted
event since it wasn't checked in the options.
... fun.
I can't seem get to get my application name to show up for
SQL:BatchCompleted messages. It shows up in the SQL:BatchStarting,
SQL:StmtStarting and SQL:StmtCompleted events.
After the connection string is set, I append ";Application Name=MyApp".
Has anyone seen this? Am I missing something?"Isaac Alexander" <isaacNOSPAM@.goNOSPAMprocura.com> wrote in message
news:eucFm3ytGHA.3264@.TK2MSFTNGP03.phx.gbl...
>I am using MS SQL Server 2005 and SQLOLEDB.1
> I can't seem get to get my application name to show up for
> SQL:BatchCompleted messages. It shows up in the SQL:BatchStarting,
> SQL:StmtStarting and SQL:StmtCompleted events.
> After the connection string is set, I append ";Application Name=MyApp".
> Has anyone seen this? Am I missing something?
>
Please ignore this message. I'm still learning the 2005 SQL Profiler. I
started with the template and the SQL:BatchCompleted didn't include the
Application Name column. I added the stored procedure event with the
Application Name column, but it showed up blank on the SQL:BatchCompleted
event since it wasn't checked in the options.
... fun.
ADO Application Name not showing up in SQL Server Profiler
I am using MS SQL Server 2005 and SQLOLEDB.1
I can't seem get to get my application name to show up for
SQL:BatchCompleted messages. It shows up in the SQL:BatchStarting,
SQL:StmtStarting and SQL:StmtCompleted events.
After the connection string is set, I append ";Application Name=MyApp".
Has anyone seen this? Am I missing something?"Isaac Alexander" <isaacNOSPAM@.goNOSPAMprocura.com> wrote in message
news:eucFm3ytGHA.3264@.TK2MSFTNGP03.phx.gbl...
>I am using MS SQL Server 2005 and SQLOLEDB.1
> I can't seem get to get my application name to show up for
> SQL:BatchCompleted messages. It shows up in the SQL:BatchStarting,
> SQL:StmtStarting and SQL:StmtCompleted events.
> After the connection string is set, I append ";Application Name=MyApp".
> Has anyone seen this? Am I missing something?
>
Please ignore this message. I'm still learning the 2005 SQL Profiler. I
started with the template and the SQL:BatchCompleted didn't include the
Application Name column. I added the stored procedure event with the
Application Name column, but it showed up blank on the SQL:BatchCompleted
event since it wasn't checked in the options.
... fun.
I can't seem get to get my application name to show up for
SQL:BatchCompleted messages. It shows up in the SQL:BatchStarting,
SQL:StmtStarting and SQL:StmtCompleted events.
After the connection string is set, I append ";Application Name=MyApp".
Has anyone seen this? Am I missing something?"Isaac Alexander" <isaacNOSPAM@.goNOSPAMprocura.com> wrote in message
news:eucFm3ytGHA.3264@.TK2MSFTNGP03.phx.gbl...
>I am using MS SQL Server 2005 and SQLOLEDB.1
> I can't seem get to get my application name to show up for
> SQL:BatchCompleted messages. It shows up in the SQL:BatchStarting,
> SQL:StmtStarting and SQL:StmtCompleted events.
> After the connection string is set, I append ";Application Name=MyApp".
> Has anyone seen this? Am I missing something?
>
Please ignore this message. I'm still learning the 2005 SQL Profiler. I
started with the template and the SQL:BatchCompleted didn't include the
Application Name column. I added the stored procedure event with the
Application Name column, but it showed up blank on the SQL:BatchCompleted
event since it wasn't checked in the options.
... fun.
Subscribe to:
Posts (Atom)