BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

TADOCommand Properties used in conjunction with Active Direc

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases (ADO)
View previous topic :: View next topic  
Author Message
Berthold Stahn
Guest





PostPosted: Wed Nov 01, 2006 4:38 pm    Post subject: TADOCommand Properties used in conjunction with Active Direc Reply with quote



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
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases (ADO) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.