PC Review


Reply
Thread Tools Rate Thread

The directory property cannot be found in the cache 8000500d

 
 
Type of Sheet displayed
Guest
Posts: n/a
 
      28th Feb 2008
I get this error when access the record attributes of the oObj. The crash
happens when the oObj.Get(Attributes(LoopCounter)) tries to pull data from an
attribute that has no value or a null, I am guessing. The database being
addressed used ADO to connect to and search an LDAP database. I have tried a
number of error handling techniques available to VBA for Excel but no good.
Still throws an exception that I cannot seem to trap so that I can reset and
just carry on to the next attribute. I am not new to development but fairly
new to VB and VBA specifically. The number of rows of data I am pulling with
this function ends up at 850 rows with about 30 attributes. This crashes on
any attribute with a null value.

Any ideas would be greatly appreciated. I am still surfing the web looking
to see if others have already discovered the answer. MSDN wasn't much help
as yet either.

Function PopulateRow(ByVal rsObj As Object, ByRef Attributes() As String,
ByVal _ RowNumber As Integer, ByVal columnNumber As Integer)

Dim LoopCounter As Integer
On Error Resume Next

' Populate a row of the spreadsheet with the Attributes from the
Metadirectory
Set CurrentCell = Cells(RowNumber, columnNumber)

LoopCounter = 0

' Go through the list of Attributes and add the Metadirectory value to
the spreadsheet
While (Len(Attributes(LoopCounter)) > 0)
Set Value = Nothing

Value = rsObj.Get(Attributes(LoopCounter))

' Put the value in the spreadsheet cell
CurrentCell.Value = Value

' Get the next attribute
LoopCounter = LoopCounter + 1

' Move over to the next cell (column)
Set CurrentCell = CurrentCell.Offset(0, 1)

Wend

End Function



Thanks,

Bryan44
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Set Expire property of data cache Deep Microsoft C# .NET 1 25th Mar 2010 10:02 PM
Run-Time Error (8000500d) - The directory property cannot be found Bryan44 Microsoft Excel Programming 2 31st Jan 2008 12:42 PM
Active directory property cannot be found in the cache Jamie Constantinou Microsoft Windows 2000 Active Directory 0 14th Apr 2004 08:55 AM
Error when setting exchange security: The directory property cannot be found in the cache Jeremy Chapman Microsoft ASP .NET 0 27th Oct 2003 09:47 PM
Setting Exchange Security Error: The directory property cannot be found in the cache Jeremy Chapman Microsoft Dot NET Framework 0 27th Oct 2003 09:46 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:15 AM.