saving form data to xml

Results 1 to 2 of 2

Thread: saving form data to xml

  1. #1
    Join Date
    Dec 1969

    Default saving form data to xml

    i am having an issue with my web server giving me a 500 <BR>if i use my own LOCAL iis, i can use the code with no issues. <BR>i am trying to take a simple form and save it to an .xml file. <BR><BR>my guess is, the server is having a hard time finding the .xml <BR>file to save to. again, since it is on a web server i dont know the full path so im using server.mappath() <BR>any help would b great! thnx in advance &#062; bg <BR><BR><BR>here is the code: <BR>&#060;% <BR> dim objXMLDoc, objCurrNode, objNewNode, objNewText, ename <BR> <BR> Set objXMLDoc = CreateObject("Microsoft.XMLDOM") <BR> objXMLDoc.async = False <BR> <BR> &#039;objXMLDoc.load ("/test/employees.xml") <BR> objXMLDoc.load Server.MapPath("employees.xml") <BR> <BR> if objXMLDoc.ParseError &#060;&#062; 0 then <BR> Response.Write ("Error: Could not get the source") <BR> else <BR> ename = Request("empname") <BR> Set objNewNode = objXMLDoc.createElement("name") <BR> Set objNewText = objXMLDoc.createTextNode(ename) <BR> objNewNode.appendChild(objNewText) <BR> <BR> Set objCurrNode = objXMLDoc.documentElement <BR> objCurrNode.appendChild(objNewNode) <BR> &#039; ("/test/employees.xml") <BR> Server.Mappath("employees.xml") <BR> Set objCurrNode = objXMLDoc.documentElement.lastChild <BR> <BR> Response.Write("Employee &#060;b&#062;") <BR> Response.Write(objCurrNode.xml) <BR> Response.Write(" &#060;/b&#062;has been added sucessfully into the database") <BR> <BR> End if <BR> set objXMLDoc = nothing <BR>%&#062;

  2. #2
    Join Date
    Dec 1969


    Click on TOOLS menu<BR><BR>Click on INTERNET OPTIONS menu item<BR><BR>Click on ADVANCED tab<BR><BR>Find "Show friendly HTTP error messages" checkbox.<BR><BR>UNCHECK that checkbox.<BR><BR>Say OK to get out of dialog.<BR><BR>Close all browser windows.<BR><BR>Open a new browser. <BR><BR>Do the thing that got you a 500 error before.<BR><BR>*Now* do you get a meaningful error message? (And, if not, you may need to go change the IIS error page settings.)<BR><BR>

Posting Permissions

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