Capricorn
10-23-2003, 03:20 AM
I have to display information from dropdownlist from database.
I have problem writing codes with it.
How do I write codes on that?
Below is what i've written but it displays the first information from database,which I don't want.
How should I amend the codes so that only information choosen from the dropdownlist is displayed?
<%
Dim conn
Dim rsItems
Dim sql
Set conn = Server.CreateObject("ADODB.Connection")
conn.Provider = "Microsoft.Jet.OLEDB.4.0"
conn.open(Server.MapPath("files.mdb"))
Set rsItems = Server.CreateObject("ADODB.Recordset")
rsItems.Open "flash" , conn
sql = "Select file_name, xml_file, flash_file FROM flash WHERE file_name = '" & Request.Form("fileload") & "'"
Response.Write _
"<br>" &_
"File Name:" & rsItems("file_name") & "<br>" &_
"XML File:" & rsItems("xml_file") & "<br>" &_
"Flash File:" & rsItems("flash_file") & "<br>"
rsItems.Close
%>
I have problem writing codes with it.
How do I write codes on that?
Below is what i've written but it displays the first information from database,which I don't want.
How should I amend the codes so that only information choosen from the dropdownlist is displayed?
<%
Dim conn
Dim rsItems
Dim sql
Set conn = Server.CreateObject("ADODB.Connection")
conn.Provider = "Microsoft.Jet.OLEDB.4.0"
conn.open(Server.MapPath("files.mdb"))
Set rsItems = Server.CreateObject("ADODB.Recordset")
rsItems.Open "flash" , conn
sql = "Select file_name, xml_file, flash_file FROM flash WHERE file_name = '" & Request.Form("fileload") & "'"
Response.Write _
"<br>" &_
"File Name:" & rsItems("file_name") & "<br>" &_
"XML File:" & rsItems("xml_file") & "<br>" &_
"Flash File:" & rsItems("flash_file") & "<br>"
rsItems.Close
%>