Solved

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

Posted on 2004-08-14
1
294 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 500 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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

I still run into .cgi files every now and then. In some instances, I actually prefer the simplicity of a .cgi script to other options. Since I use DreamWeaver extensively, what I needed was a way to open .cgi scripts in Dreamweaver. And I wanted to …
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…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

705 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now