Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by kenja on Feb 06, 2008 13:10
open dhtmlx forum
load xml error for asp load.asp

the following code gets a load xml error for the combo box:

xmlFile = Server.MapPath("account.xml")

set objFSO = Server.CreateObject( "Scripting.FileSystemObject" )


sql = "SELECT AccountId, replace(AccountName, '&','&') as AccountName FROM [Account] WHERE OwnerCRMID =

'TomNoble' and AccountName like '" & acctNm & "%' and Active = 1 order by AccountName ASC"

dbOpen
'If dbExecuteRS(sql,rs) Then

Response.Buffer = True
Response.ContentType = "text/xml"
'response.write("<?xml version=""1.0"" encoding=""ISO-8859-1""?>")
'response.write ("<complete add='true'>")
set objPRIV = objDBConnection.execute(sql)
objFSO.CreateTextFile( xmlFile )
set objWrite = objFSO.OpenTextFile( xmlFile, 2 )

objWrite.WriteLine("<?xml version=""1.0"" ?>")
objWrite.WriteLine("<complete add='true'>")

do while not objPRIV.eof
'response.write("<option value="""& objPRIV("AccountId") &">")
'response.write(objPRIV("AccountName"))
'response.write("</option>")

objWrite.WriteLine("<option value="&"'"&objPRIV("AccountId")&"'"&">" & objPRIV("AccountName") & "</option>")

     objPRIV.MoveNext
loop
objWrite.WriteLine("</complete>")
objWrite.Close()


'response.write("</complete>")
'end if
Answer posted by Support on Feb 07, 2008 05:19
The code which writes data in file looks correct, but code which outputs data not so good
>>'response.write("<option value="""& objPRIV("AccountId") &">")
closing quote missed for "value" attribute