0

Error.Description : Unable to find an object or data matching the name, to the beach or the selection criteria within the scope of this operation.

I'm getting this error when I run code on Windows 7. It doesn't appear on Windows XP. I read this article and had no luck. Here is the code:

Public Function testLL()

Dim rc As New ADODB.Record
Dim rs As New ADODB.Recordset
Dim conn As ADODB.Connection
Dim objStream As New ADODB.Stream
Dim sURL As String

sURL = "http://livelink.company.com/livelinkdav/nodes/154680737/"

rc.Open sURL, , adModeReadWrite

Set rs = rc.GetChildren

If Not (rs.BOF And rs.EOF) Then
    rs.MoveFirst
    MsgBox rs.Fields(1).Value

End If 

End Function

Some people have suggested this a problem with MDAC version. I can check the version on Windows 7, but I need admins rights on XP so I couldn't verify if the versions were the same.

Michael Petch
  • 46,082
  • 8
  • 107
  • 198
trixrabbit
  • 259
  • 7
  • 22

1 Answers1

0

I tried another option, it works fine when I try to connect to livelink, but it doesn't work when I try with Content Server which is what I'm trying to use. I still use LiveLink for my tests.

I changed the / to \ in sURL :

sURL = "\\livelink.ge.hydro.qc.ca\livelinkdav\nodes\154680737 

Dim objFSO As New Scripting.FileSystemObject
Dim objFolder As Scripting.Folder
Dim colFiles As Scripting.Files
Dim colFolders As Scripting.Folders

Set objFolder = objFSO.GetFolder(sURL)
Set colFiles = objFolder.Files
Set colFolders = objFolder.SubFolders


MsgBox colFiles.Count
MsgBox colFolders.Count

With this code I can count the folders and file in my LiveLink folder, I was also able to create folder. Still I would prefer to use URLs since this does not work with Content Server for some reason (can't find path). I still don't know why my previous code works on Windows XP and not on Windows 7.

edit: Couldit be because webdav isn't well configured by default in 64bit?

trixrabbit
  • 259
  • 7
  • 22