Click to See Complete Forum and Search --> : Display information


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

%>

simflex
10-23-2003, 01:36 PM
let me ask you a question.
Let's say that I open your dropdown list containing 3 values:
file_Name, xml_file, flash_file and I select file_Name, what information do you expect to see dislayed?