Thread View: borland.public.cppbuilder.database.ado
1 messages
1 total messages
Started by Berthold Stahn
Wed, 01 Nov 2006 10:38
TADOCommand Properties used in conjunction with Active Directory
Author: Berthold Stahn
Date: Wed, 01 Nov 2006 10:38
Date: Wed, 01 Nov 2006 10:38
37 lines
2393 bytes
2393 bytes
Hi ,
I'm working on a project querying AD with ADO. The provider is
ADSDsoObject and
you have some provider specific properties of the ADO command object.
I've tried every combination and none of them seemed to work properly. I'm
using
TAdoComand and TAdoConnection. Every time, when I try to set a property
the progam
throws an EOleException: Name or Ordinal not found.
Here's a snipped of my coding:
TListItem *ListItem;
switch ( cbContainer->ItemIndex ) {
case 0 : {
cmdLDAP1->CommandText = "Select cn,adsPath FROM " +
QuotedStr("LDAP://OU=TFD044Groups,OU=TFD044,OU=TFD,OU=FCG,DC=uk,DC=parker,DC=corp")
+
" where objectCategory = 'group' order by cn";
cmdLDAP1->Properties->Item["Page Size"]->Value = 10;
dsLDAP1->Recordset = cmdLDAP1->Execute();
dsLDAP1->First();
for ( int i = 0; i < dsLDAP1->RecordCount; i++)
{
ListItem = lvGroups->Items->Add();
ListItem->Caption = dsLDAP1->Fields->FieldByName("cn")->AsString;
ListItem->SubItems->Add(dsLDAP1->Fields->FieldByName("adsPath")->AsString);
dsLDAP1->Next();
}
} break;
I'm using CBuilder 6 and any idea will be wellcome.
Thanks
Berthold
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads