dynamic loading xml file

dhtmlcombo with dynamic xml file



my source is given bellow





main.asp













<%

nrs2.Open “select * from treatment where pcode=” &"’"&npcode&"’" & “and tretdate=” &"’"&mdate&"’"& " order by id" , con,3,3

if nrs2.RecordCount=0 Then

nrs2.Close

set nrs=nothing

con.Close

set con=nothing

Response.redirect “newhead.asp”

end if

c=1

if nrs2.eof then

nrs2.MoveFirst

end if



while not nrs2.eof

mdelrow=nrs2(“dflag”)%>



<% if mdelrow=“Y” Then %>



<% else %>



<% end if %>











<%

c=c+1

nrs2.MoveNext

wend

nrs2.Close

set nrs2=nothing



%>



<%=c%>. <%=c%>.















<%=nrs2(“doz”)%>
















here is my db2xml.asp









<% Dim objConn, strConnect, strSQL, rs, tb, mdbFile, objFSO, xmlFile, objWrite,c,cnum

cnum=request.querystring(“colname”)

xmlFile = Server.MapPath(“product.xml”)

mdbFile = Server.MapPath(“pprofile.mdb”)



tb = chr(9)



set objFSO = Server.CreateObject( “Scripting.FileSystemObject” )

Set objConn = Server.CreateObject( “ADODB.Connection” )



objConn.Open “Provider=Microsoft.Jet.OLEDB.4.0;Data Source=” & mdbFile



objFSO.CreateTextFile( xmlFile )

set objWrite = objFSO.OpenTextFile( xmlFile, 2 )



objWrite.WriteLine("<?xml version=""1.0"" ?>")

objWrite.WriteLine("")







strSQL = “SELECT * FROM product where prdname like '”&trim(cnum)&"%’ order by prdname"

Set rs = objConn.Execute(StrSQL)

Do While not rs.EOF

c=rs(“id”)

objWrite.WriteLine(tb & “<option value=”&"’"&Cstr©&"’"&">" & rs(“prdname”) & “”)

rs.MoveNext



Loop

objWrite.WriteLine("")

objWrite.Close()



%>



i have added header as u said



now, its not showing any error

but data is not popolated in combo





pls advice me what to do





thanks in advance

>

>

>

This will not work. The content type can be set by
<% response.ContentType =“text/xml”  %>