Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Thanks for your help, one last question

Status
Not open for further replies.

frogggg

Programmer
Jan 17, 2002
182
US
Alright, thanks everyone who helped me with this ridiculous listbox problem. I think I've got it.

On click, server side, I get the value of the listbox like this:
lstLocation.getText(lstLocation.selectedIndex)
and then put it in a session variable so I can get it on the next page. I know this is not the best design but it works, so for now that is how it will stay.

This works ok for one of my pages, but on the other, where I need to use the session variable in a sql query to the database, I am running into trouble. Here is my code and here is the error:

rsDisplay.setSQLText("SELECT JobInfo.* " _
& "FROM JobInfo " _
& "WHERE Location=" & session("Location"))

Too few parameters. Expected 2.

As far as I can tell, everything else is working correctly, I tried response.write the session variable and that works ok. So is there something about session variables that I don't know.

Thanks in advance for any help.
 
If the session var is a string don't forget quotes around it. <insert witticism here>
codestorm
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top