Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Search form using Dreamweaver MX 2004, ASP.NET and MsSQL

Posted on 2004-08-14
1
Medium Priority
?
318 Views
Last Modified: 2010-04-25
I’m trying to get a search form using Dreamweaver MX 2004, ASP.NET and MsSQL.
The search page is for a realtor site and needs to be able to search the following field: (City and State OR Zip Code) then (PriceMin to PriceMax  AND OR Bed AND OR Bath) OR MLS# , here is the last of many mistakes.

SELECT *
FROM dbo.rDescription
WHERE (((dCuID = '117836543') AND ((dbo.rDescription.dCity = @dCity AND dbo.rDescription.dState = @dState) OR (dbo.rDescription.dZipcode = dZipcode)) AND ((dbo.rDescription.dPrice >= @PriceMin AND dbo.rDescription.dPrice >= @PriceMax And dbo.rDescription.dBed >= @dBed And dbo.rDescription.dBath >= @dBath OR dbo.rDescription.MLS = @MLS)))

Paramaters:

@dCity  Value =  IIf((Request.Form("dCity ") <> Nothing), Request.Form("dCity "), "")
@dState  Value =  IIf((Request.Form("dState") <> Nothing), Request.Form("dState"), "")
@dZipcode  Value =  IIf((Request.Form("dZipcode") <> Nothing), Request.Form("dZipcode"), "")
@PriceMin  Value =  IIf((Request.Form("PriceMin") <> Nothing), Request.Form("PriceMin"), "")
@PriceMax  Value =  IIf((Request.Form("PriceMax") <> Nothing), Request.Form("PriceMax"), "")
@dBed  Value =  IIf((Request.Form("dBed") <> Nothing), Request.Form("dBed"), "")
@dBath  Value =  IIf((Request.Form("dBath") <> Nothing), Request.Form("dBath"), "")
@MLS  Value =  IIf((Request.Form("MLS") <> Nothing), Request.Form("MLS"), "")

Form Fields:

dCity, dState, dZipcode, PriceMin, PriceMax, dBed, dBath, MLS
0
Comment
Question by:ajstubblefield
1 Comment
 
LVL 9

Accepted Solution

by:
prifre earned 2000 total points
ID: 11805765
Hi,

I would probably use "LIKE" and some "%" instead of just "=" to compare the strings.

Anyhow,
"dbo.rDescription.dPrice >= @PriceMin AND dbo.rDescription.dPrice >= @PriceMax"  ... seems a little funny
I think it should be:
"dbo.rDescription.dPrice >= @PriceMin AND dbo.rDescription.dPrice <= @PriceMax"

with a smile
/prifre
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Adobe Dreamweaver CS5 is a WYSIWYG web page editor that has advanced HTML, CSS, and Javascript rendering functionality and is probably the most well-known HTML editor available. Much of Dreamweaver's appeal centers around the Design View interfac…
This article is very specific and is only intended to help if you are installing Dreamweaver 8 in a Windows 7 environment with Office 2007 installed.   I'm not sure why Microsoft tends to release OS' that should not be released but they do.  Windows…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question