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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Where clause problem

Status
Not open for further replies.

farazmit

Programmer
Jan 3, 2005
14
US
I have a sql statement which reads some data from an access database.
for thw where clause I would like to get it's value from one of my forms but I can't use document.form.listname.options[selectedIndex] to access my form in sql where caluse.
How should I perform that.
Here is the code:
Recordset2.Source = "SELECT BusName FROM BusinessInfo WHERE City = '"+ documents.form1.select.options[selectedIndex] +"'";
Thanks
 
The documents.form1... part is client side javascript and the rest is server side. You can use

Recordset2.Source = "SELECT BusName FROM BusinessInfo WHERE City = '"+ request.form("select") +"'" to do the same thing
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top