Bookshelf Home | Contents | Index | PDF |
Siebel Finance Guide > Sample ASPs for Household Financial Accounts Virtual Business Components > cashflow.aspUse the following sample ASP to test retrieving data for the Cash Flow view. <%@ EnableSessionState=False Language=VBScript %> aConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" _ & "Data Source=c:\Inetpub\ibd\mdb.mdb" Set Conn = Server.CreateObject("ADODB.Connection") Conn.ConnectionString = aConnectionString Set R=Server.CreateObject("ADODB.Recordset") aPath = Request.ServerVariables("PATH_TRANSLATED") ' strip the file name from the path aPath = Left(aPath, instrRev(aPath, "\")) aLogFile = aPath & "\log\cash.log" set fs = Server.CreateObject("Scripting.FileSystemObject") set ts = fs.OpenTextFile(aLogFile, 8, True, 0) 'for each item in Request.ServerVariables 'ts.writeline Request.ServerVariables(item) set domDoc = Server.CreateObject("MSXML.DOMDocument") 'domDoc.setProperty("ServerHTTPRequest")=true set root = domDoc.documentElement 'inputText = Request.Form("textInput") Case "siebel-xmlext-fields-req" R.Open SQL, Conn, 3, 1, &H0001 domDoc.save (server.MapPath("init1.xml")) Response.Write "<?xml version= ""1.0"" encoding=""UTF-8""?>" Response.Write "<siebel-xmlext-fields-ret>" Response.Write "<support field='"& F.Name &"'/>" Response.Write "</siebel-xmlext-fields-ret>" Case "siebel-xmlext-query-req" 'This section of SelectCase is for the Query Request set mainNodes = root.childNodes ts.writeline "Document have MainNodes: " & mainNodes.length For each matchNode in MainNodes 'set attribs = matchNode.attributes 'attName1(z) = attrib.nodeValue ts.writeline "Main Node Name: " & matchNode.nodeName ts.writeline "Main Node type: " & matchNode.nodeType ts.writeline "Main Node value: " & matchNode.nodeValue 'ts.writeline "match Node data: " & matchNode.data ts.writeline "Main line text: " & matchNode.text set matchNodes = root.SelectNodes("search-string") ts.writeline "MatchNodes in document are : " & matchNodes.length For each matchNode in matchNodes ts.writeline "Match string is :" & matchNode.text ts.writeline "This is sWhere " & sWhere 'setting the WHERE clause in order to query the correct recordset R.Open SQLwhere, Conn, 3, 1, &H0001 domDoc.save (server.MapPath("init2.xml")) 'build response stream by iterating through the recordset Response.Write "<?xml version= ""1.0"" encoding=""UTF-8""?>" Response.Write "<siebel-xmlext-query-ret>" 'ts.write "<?xml version="1.0" encoding="UTF-8"?>" 'ts.write "<siebel-xmlext-query-ret>" Response.Write "<value field="""& F.Name &""">"& F.Value &"</value>" 'ts.write "<value field="""& F.Name &""">"& F.Value &"</value>" Response.Write "</siebel-xmlext-query-ret>" 'ts.write "</siebel-xmlext-query-ret>" Case "siebel-xmlext-preinsert-req" Response.Write "<siebel-xmlext-preinsert-ret>" Response.Write "</siebel-xmlext-preinsert-ret>" Case "siebel-xmlext-insert-req" Case "siebel-xmlext-delete-req" |
Siebel Finance Guide | Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices. | |