Welcome to Office & SharePoint Pro Sign in | Join | Help
in Search

SUBSCRIBE to Windows IT Pro Magazine & SAVE 30%      FREE Email Newsletters Vista UPDATE, Windows IT Pro UPDATE & More

Error on getting description of categories in SPS2001

Last post 02-20-2007, 4:58 AM by kizin. 0 replies.
Sort Posts: Previous Next
  •  02-20-2007, 4:58 AM 28193

    Error on getting description of categories in SPS2001

    An error occured when i try the command :"oDoc.DataSource.Open"

    the error is : 2147217768 meaning :
    " The provider was unable to create an object at this URL because an object named by this URL already exists "
    _____________________________________________
    Sub GetDescCategorie
    on error resume next

    Dim strDoc, dictCats, SingleCat, typeBoucle, dictCatsDesc

    strDoc = HttpRoot & "/Catgories/" & Rub1

    Set oDoc = createobject("CDO.KnowledgeCategoryFolder")

    oDoc.DataSource.Open strdoc, Nothing, adModeRead,,,UserAdm ,PwdAdm
    if err <> 0 then erreur = "Erreur lors oDoc.DataSource.Open 1 :: \nNum de l'erreur : " & err.number &"
    "
    Rub1 = Rub1 & " - " & oDoc.Description
    if err <> 0 then erreur = "Erreur lors Rub1 - oDoc.Description :: \nNum de l'erreur : " & err.number &"
    "
    ' Set oDoc= Nothing

    If Len(Rub2)>0 Then
    strDoc = strDoc & "/" & Rub2
    response.write "TEST : RUB2" & strDoc & "
    "
    oDoc.DataSource.Open strDoc, Nothing, adModeRead,,,UserAdm ,PwdAdm
    if err <> 0 then erreur =erreur & "Erreur lors oDoc.DataSource.Open 2 :: \nNum de l'erreur : " & err.number &"
    "
    Rub2 = Rub2 & " - " & oDoc.Description
    if err <> 0 then erreur =erreur & "Erreur lors Rub2 - oDoc.Description :: \nNum de l'erreur : " & err.number &"
    "
    ' Set oDoc= Nothing

    End if

    If Len(Rub3)>0 Then
    strDoc = strDoc & "/" & Rub3
    response.write "TEST : RUB3" & strDoc & "
    "
    oDoc.DataSource.Open strDoc, Nothing, adModeRead,,,UserAdm ,PwdAdm
    if err <> 0 then erreur =erreur & "Erreur lors oDoc.DataSource.Open 3 :: \nNum de l'erreur : " & err.number &"
    "
    Rub3 = Rub3 & " - " & oDoc.Description
    if err <> 0 then erreur =erreur & "Erreur lors Rub3 - oDoc.Description :: \nNum de l'erreur : " & err.number &"
    "
    ' Set oDoc= Nothing
    End if


    If Len(sRub3)>0 Then
    strDoc = strDoc & "/" & sRub3
    response.write "TEST : sRUB3" & strDoc & "
    "
    oDoc.DataSource.Open strDoc, Nothing, adModeRead,,,UserAdm ,PwdAdm
    if err <> 0 then erreur =erreur & "Erreur lors oDoc.DataSource.Open 3b :: \nNum de l'erreur : " & err.number &"
    "
    sRub3 = sRub3 & " - " & oDoc.Description
    if err <> 0 then erreur =erreur & "Erreur lors sRub3 - oDoc.Description :: \nNum de l'erreur : " & err.number &"
    "
    End if


    If Len(Rub4)>0 Then
    strDoc = strDoc & "/" & Rub4
    response.write "TEST : RUB4" & strDoc & "
    "
    oDoc.DataSource.Open strDoc, Nothing, adModeRead,,,UserAdm ,PwdAdm
    if err <> 0 then erreur =erreur & "Erreur lors oDoc.DataSource.Open 4 :: \nNum de l'erreur : " & err.number &"
    "
    Rub4 = Rub4 & " - " & oDoc.Description
    if err <> 0 then erreur =erreur & "Erreur lors Rub4 - oDoc.Description :: \nNum de l'erreur : " & err.number &"
    "
    ' Set oDoc= Nothing
    End if

    Set oDoc= Nothing
    ' S'il y a un problme, arrte l'excution de la page
    on error goto 0

    ' Puis affichage
    if erreur <> "" then
    Response.write(erreur)
    RESPONSE.end
    end if
    end Sub


    _____________________________________________
    the result :

    TEST : RUB2http://W2sspsgn/edelib/Catégories/0/02
    TEST : RUB3http://W2sspsgn/edelib/Catégories/0/02/020
    TEST : sRUB3http://W2sspsgn/edelib/Catégories/0/02/020/0202
    TEST : RUB4http://W2sspsgn/edelib/Catégories/0/02/020/0202/0202-04
    Erreur lors Rub1 - oDoc.Description :: \nNum de l'erreur : -2147220240
    Erreur lors oDoc.DataSource.Open 2 :: \nNum de l'erreur : -2147217768
    Erreur lors Rub2 - oDoc.Description :: \nNum de l'erreur : -2147220240
    Erreur lors oDoc.DataSource.Open 3 :: \nNum de l'erreur : -2147217768
    Erreur lors Rub3 - oDoc.Description :: \nNum de l'erreur : -2147220240
    Erreur lors oDoc.DataSource.Open 3b :: \nNum de l'erreur : -2147217768
    Erreur lors sRub3 - oDoc.Description :: \nNum de l'erreur : -2147220240
    Erreur lors oDoc.DataSource.Open 4 :: \nNum de l'erreur : -2147217768
    Erreur lors Rub4 - oDoc.Description :: \nNum de l'erreur : -2147220240 ____________________________________________ I want to get the description and i don't understand the meaning of the error. This function works on an other server but not on this one. Somebody knows the package/API/something missing? Thanks, Yann
View as RSS news feed in XML
SPONSORED LINKS FEATURED LINKS

Order Your Fundamentals CD Today!Get up to speed quickly and learn how to uncover rich information management and deployment capabilities with this free SharePoint CD. Simplify Content Migration for SharePointEase the job of SharePoint migration and ongoing site maintenance. Michael Noel outlines your migration options in this white paper. Download today! You’ve Deployed SharePoint…Now What?This one-day free online conference delivers the technical knowledge needed to kick MOSS up a notch. In one information-packed day, independent SharePoint experts will present practical, real-world information and provide take-away, ready-to-use solutions Ease Your Scripting Pains with the Flexibility of PowerShell!Join MVP Paul Robichaux on December 11, 2008 at 11:00 AM EDT as he equips you with PowerShell basics in 3 introductory lessons, each followed by a live Q&A session—all on your own computer! Protecting Sharepoint with Double-Take for Windows 5.0Providing SharePoint recoverability is a two step process. Learn those steps now. Vendor protection solutions for SharePoint are incomplete at worst and unreliable at best. So what’s an Administrator to do? Read More… Maximize Your SharePoint Investment This web seminar discusses how true bi-directional replication of SharePoint content from one server to another enables branch offices to maintain access to current SharePoint content.