dhtmlcombo with dynamic xml file
my source is given bellow
main.asp
<%=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