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

Passing a drop down menu option into an SQL statement

Status
Not open for further replies.

outonalimb

Technical User
Oct 7, 2003
454
GB

I am trying to pass a value from a drop down menu into a SQL statement. The drop down menu contains only numbers.

I have this sussed for drop down menus containing text, but when I pass the number through, I get a data mismatch error.

I want the user to select a number from the menu and then perform a search based on this number.

What am I doing wrong?

Regards,
 
Hi,

Post your code so we can have a look at it. Most likely you are you have "" around a value that doesn't need it.

Cheers

ab
 

I thought it might be a conversion problem. How do I convert a string to an integer? I am fairly new to ASP.

Regards,
 
hi outonalimb
u can try with this code
SQL="Select * from tablename where field=" & Cint(Request("comboname"))
I think it is problem of data type conversion
Enjoy Programming!!!!!!!!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top