IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Cursor Example

    Posted Wed December 04, 2002 08:16 PM

    Are there any examples using cursors to retrieve records to page through a result set for the ActiveX (COM+) API?


    #webMethods
    #webMethods-Tamino-XML-Server-APIs
    #API-Management


  • 2.  RE: Cursor Example

    Posted Thu December 05, 2002 08:41 AM

    With a more recent version of TaminoX (since Tamino 3.1.2.1) you should be able to do something like the following:

    ’ use real cursor
    TamX.UseRealCursoring (2) ’ RealCursorScrollable
    ’ start transactional session
    Call TamX.StartSession(0, 0)
    ’ set pagesize for cursor
    TamX.lPagesize = 2

    ’ perform query and process results
    Set doc = TamX.DoQuery(“Doc/Tag”)
    Set nodelist = doc.SelectSingleNode(“//xql:result”).ChildNodes

    outputText (“FIRST:”)
    For Each node In nodelist
    outputText (“NODE: " & node.xml)
    Next

    ’ process subsequent pages
    While TamX.IsNext(doc) <> 0
    outputText (“NEXT:”)
    Set doc = TamX.GetNext(doc)
    Set nodelist = doc.SelectSingleNode(”//xql:result").ChildNodes
    For Each node In nodelist
    outputText (“NODE: " & node.xml)
    Next
    Wend

    ’ process previous pages
    While TamX.IsPrevious(doc) <> 0
    outputText (“PREVIOUS:”)
    Set doc = TamX.GetPrev(doc)
    Set nodelist = doc.SelectSingleNode(”//xql:result").ChildNodes
    For Each node In nodelist
    outputText ("NODE: " & node.xml)
    Next
    Wend

    ’ close cursor
    TamX.CloseCursor (doc)
    ’ end transactional session
    TamX.EndSession


    #webMethods
    #API-Management
    #webMethods-Tamino-XML-Server-APIs