Aras Community

Welcome to Aras Community Sign in | Join | Help
Aras Community
Please Also Visit the Project Site to Download Add-Ons and Solutions
Jump to Projects

vault a file from vb.net

  •  10-19-2007, 9:50 AM

    vault a file from vb.net

    Insufficient relationship count (0) of Located relationships. At least 1 required.

     

    I can't vault a file - can some one explain what I'm doing wrong?

     

    Dim conn As IOM.HTTPServerConnection = New IOM.HTTPServerConnection

    conn.innovator_server_url = "http://10.12.19.57/InnovatorServer/Server/InnovatorServer.aspx"

    conn.http_username = "willig01"

    conn.http_password = IOM.Innovator.ScalcMD5("12345678")

    conn.http_database = "InnovatorSolutions"

    conn.vault_server_url = "http://10.12.19.57/InnovatorServer/vault/VaultServer.aspx"

    Dim inn As IOM.Innovator = New IOM.Innovator(conn)

    Dim queryItem As IOM.Item = inn.newItem("User", "get")

    queryItem.setAttribute("select", "login_name")

    Dim qryRes As IOM.Item = queryItem.apply

    System.Console.WriteLine("Number of Users: " & qryRes.getItemCount)

    'Dim docItm As IOM.Item = inn.getItemByKeyedName("Document", "1234567")

    'docItm.apply("edit")

    'docItm.setProperty("Description", "Desc???")

    Dim fileItm As IOM.Item = inn.newItem("File", "add")

    fileItm.setFileName("C:\Gary\CMII\Legend.dwg")

    'Dim relItm As IOM.Item = inn.newItem("Document File", "add")

    'docItm.addRelationship(relItm)

    'relItm.setRelatedItem(fileItm)

    Dim Res As IOM.Item = fileItm.apply()

    If Res.isError Then

    Console.WriteLine(Res.getErrorDetail)

    End If

    conn.Close()

    Filed under: ,
View Complete Thread
Powered by Community Server, by Telligent Systems