Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XML
|
XML General XML discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XML section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 28th, 2004, 12:13 PM
Registered User
 
Join Date: Apr 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default ASP+XML OBJECT REQUIRED PROBLEM! S O S!

Hi guys,I really need your help here.Ihave a site about electronic submission of taxation and i get a specific error when i try to open a page.I am desperate.

I have used MS Access to keep the personal details of each customer and an XML file to store all the data that a customer must enter in order to fill 5 different forms with his economic status etc.A customer can fill some of these 5 forms and save them and can login another time in order to fill the rest forms.When,for example,a customer fills only 2 forms(pin0,pin1) these data is stored in an xml file(virtual directory/users/temp/.......xml) which is created automatically when a customer press the button "save" after having filled some of these forms.

The xml file is the following:

In every child is stored the details in each text box of each form and every pin(pin0,pin1,pin2,pin3,pin4) is each different form(ÍÁÉ=YES).


 <?xml version="1.0" ?>
- <Report Tax="ÖÏÑÏËÏÃÉÊÇ ÄÇËÙÓÇ" Document="Å1">
  <pin0>NAI</pin0>
  <child0>rttrr</child0>
  <child1>trtret</child1>
  <child2>trt</child2>
  <pin1>NAI</pin1>
  <child3>ttret</child3>
  <child4>ertr</child4>
  <child5>fdfdgdgf</child5>
  <child6>45454554</child6>
  <child7>trtre</child7>
  <child8>445455</child8>
  <child9>trrtrt</child9>
  <child10>rtt</child10>
  <child11>453454</child11>
  <child12 />
  <child13 />
  <child14 />
  <child15 />
  <child16 />
  <child17 />
  <child18 />
  <child19 />
  <child20 />
  <child21 />
  <child22 />
  <child23 />
  <child24 />
  <child25 />
  <child26 />
  <pin2>NAI</pin2>
  <child27 />
  <child28 />
  <child29>checked</child29>
  <child30 />
  <child31>checked</child31>
  <child32 />
  <child33 />
  <child34 />
  <child35 />
  <child36 />
  <child37 />
  <child38 />
  <child39 />
  <child40 />
  <child41 />
  <child42 />
  <child43 />
  <child44 />
  <child45 />
  <child46 />
  <child47 />
  <child48 />
  <child49 />
  <child50 />
  <pin3 />
  <pin4 />
  </Report>



It's ok till here.But when i alogin again as a customer and try to open the link in order to fill the rest forms i get the following error:


Error Type:
Microsoft VBScript runtime (0x800A01A8)
Object required
/dilosi/global/route_saved.asp, line 46


Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)



The ASP file is the following and contains some XML code:

<%@ Language=VBScript %>
<%
Session("list")=Request.QueryString("list")
Session("browse") = Request.Querystring("browse") 'prepare for rid********************************? yes, if browse <> "No"


Set Con = Server.CreateObject( "ADODB.Connection" )
Con.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" &_
"" & Request.ServerVariables("APPL_PHYSICAL_PATH") & "db\dilosi.mdb"


mySQL1 = "SELECT temp FROM Customers WHERE username = '" & Session("user_name") & "'"
Set RS = Con.Execute (mySQL1)
Session("temp") = RS("temp") ' this is the core part

SET RS = NOTHING
Con.Close
Set Con = nothing

Session("viewed") = "N" ' IF IT'S TRUE THEN THE FORM FIELDS WILL RETRIEVE DATA FROM XML ELSE FROM SESSIONS


IF Session("temp") = true THEN

'Declare local variables
 Dim objDom
 Dim objRoot, objpin0, objpin1, objpin2, objpin3, objpin4, objMarried

 'Instantiate the XMLDOM Object that will hold the XML file.
 Set objDom = Server.CreateObject("Microsoft.XMLDOM")

 'Turn off asyncronous file loading.
 objDom.async = false

 user_xml_file = Session("user_name") & "_" & year(date) & ".xml"
 strXMLFile = Request.ServerVariables("APPL_PHYSICAL_PATH") & "users\temp\" & user_xml_file

 'Load the XML file.
 objDom.load(strXMLFile)

'Set the objRoot variable equal to the root element of the
 'XML file by calling the documentElement method of the
 'objDom (XMLDOM) object.
Set objRoot = objDom.documentElement

Set objpin0 = objRoot.selectSingleNode("pin0")
Set objpin1 = objRoot.selectSingleNode("pin1")
Set objpin2 = objRoot.selectSingleNode("pin2")
Set objpin3 = objRoot.selectSingleNode("pin3")
Set objpin4 = objRoot.selectSingleNode("pin4")
set objMarried = objRoot.selectSingleNode("child12")

if objMarried.text = "checked" then
Session("married") = "NAI"
else
Session("married") = "OXI"
end if

if objpin0.text = "NAI" then
Session("pin0") = "NAI"
end if

if objpin1.text = "NAI" then
Session("pin1") = "NAI"
end if

if objpin2.text = "NAI" then
Session("pin2") = "NAI"
end if

if objpin3.text = "NAI" then
Session("pin3") = "NAI"
end if

if objpin4.text = "NAI" then
Session("pin4") = "NAI"
end if

 Set objpin0 = nothing
 Set objpin1 = nothing
 Set objpin2 = nothing
 Set objpin3 = nothing
 Set objpin4 = nothing
 Set objDom = nothing
 Set objRoot = nothing

END IF
Response.Redirect("../global/Response.asp")
%>


Can you help me please?I would be grateful for a solution.
Thank you in advance!





Similar Threads
Thread Thread Starter Forum Replies Last Post
XML Parse Error - OBJECT REQUIRED?!? kevorkian XML 3 November 29th, 2007 02:53 PM
Object required jpaul VB Databases Basics 5 November 14th, 2007 12:10 PM
Error:Object required, running COM dll with ASP mannanhere Classic ASP Components 1 August 6th, 2005 01:02 AM
XSLT for complicated xml to xml transf. required doug@sirvisetti XSLT 3 June 17th, 2005 04:26 PM
XML/ASP/Javascript combo......help required crmpicco Classic ASP Databases 1 March 4th, 2005 06:50 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.