Solved

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

Posted on 2004-08-14
1
305 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

For those who don't know, Adobe Dreamweaver is a popular commercial web editor that enables you to design, build and manage complex websites. The editor is a WYSIWYG (What You See Is What You Get) web editor, which means that you can create your web…
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 …
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

729 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