<%@ LANGUAGE="VBSCRIPT" %> <% dim id,parent,oXmlResp id=trim(Request.QueryString("id")) parent=trim(Request.QueryString("Parent")) response.clear Response.CacheControl = "no-cache" Response.AddHeader "Pragma", "no-cache" Response.Expires = -1 Response.ContentType="text/xml" Response.write "" & vbLf response.write vbLf & "" if id="" then response.write vbLf & "" response.write vbLf & "No ID provided!" response.write vbLf & "" elseif not OpenDB then response.write vbLf & "" response.write vbLf & server.htmlencode(oDB.LastErrorMsg) response.write vbLf & "" else oDB.DisplayErrors=false oDB.ErrMsgFmt="MULTILINE" set oXmlResp=new ricoXmlResponse response.write vbLf & "" if parent <> "" then oXmlResp.Query2xmlRaw "SELECT '" & parent & "',CustomerID,CompanyName,'L',1 FROM customers where CompanyName like '" & parent & "%'",0,99 else oXmlResp.WriteTreeRow "","root","Customer names starting with...","C",0 oXmlResp.Query2xmlRaw "SELECT distinct 'root',left(CompanyName,1),left(CompanyName,1),'C',0 FROM customers",0,99 end if response.write vbLf & "" if not IsEmpty(oDB.LastErrorMsg) then response.write vbLf & "" response.write vbLf & server.htmlencode(oDB.LastErrorMsg) response.write vbLf & "" end if set oXmlResp=Nothing end if CloseApp response.write vbLf & "" %>