|
-
Feb 2nd, 2005, 11:43 AM
#1
Thread Starter
Junior Member
Data Mismatch Error
I am creating a search function for a website that will use ASP/VBScript to add a dynamic aspect. One of my search criteria is a dropdown box for price - <1000 or >1000
I am getting a data mismatch error when executing the SQL statement.
Can I use comparison a comparison operator i.e. ">" or "<" to examine a currency data type or must it be numeric only.
Heres the code
Dim price
Dim operator
price = request("price")
if price = "<1000" then
operator = "<"
price = CInt("1000")
elseif price = ">1000" then
operator = ">"
End if
strSQL = "Select * from Rentals Where Price " & operator & " " & price & " AND Bedrooms = ........
Any ideas would be appreciated
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|