Want to get rid of Google Ads, click here.
+ Reply to Thread
Results 1 to 3 of 3

Thread: Help! Does anyone know how to use setquery?

  1. #1
    Junior Member
    Join Date
    Oct 2008
    Posts
    13

    Default Help! Does anyone know how to use setquery?

    Does anyone know how to use the setQuery() method in HPSM web services?

    We are trying to update the "open" field on cm3t table by a web service call, but when trying to set it directly via setOpen() method, we get "Not Authorized." The extaccess looks like it is set up correctly for the "open" field. Since this is not working, we were thinking of trying to use the setQuery() method calling SQL syntax. An additional complexity is [Open] is a reserved word in SQL.

    Any ideas or help on this would be greatly appreciated. Being the novice, I think I may simply be coding the setQuery() syntax incorrectly.

    This how I have it currently coded:
    setQuery("Update cm3tm1 set [Open]='f' where number='113'")

    This however gives us a message that "No more records found."

  2. #2
    Senior Member
    Join Date
    Jan 2002
    Location
    The Netherlands
    Posts
    930

    Default

    the query you pass in should be "SM" (rad) speak, not sql, and is only query related.

    If you are trying to open/reopen an existing change, you will have to perform that action against that record. So send a Change Management SOAP message that has the status field set to "open". Or call the correct action based on only the Change number.

  3. #3
    Junior Member
    Join Date
    Oct 2009
    Posts
    9

    Default

    Hi travhpsm,

    I saw the response "Not Authorized". Don't forget to set the username and password, SCenter always need a user to do the transactions. In the query, you can use the WHERE part in a standart SQL Sentence, I mean, you should do something like setQuery("number=113"). In that case, the query must set in Scenter language, not SQL, eg. when there is dots in the field name, it must not change for the _ character.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts