Solved

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

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of 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…
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…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

617 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