PC Review


Reply
Thread Tools Rate Thread

custom query causes database results wizard error

 
 
=?Utf-8?B?TWFyZ290?=
Guest
Posts: n/a
 
      4th Feb 2007
Hi,
I want to make a ‘BETWEEN’-clause with 2 parameters in the database results
wizard, but I keep getting an error message when I test my pages on my
server. Can anyone help me with this? Details are provided below.

I have made 2 webpages. The 1st page is called search.asp and the 2nd one
searchres.asp.
On ‘search.asp’ I have created a form with 2 dropdown boxes which are named:
startprice and endprice.
‘Search.asp’ posts the form results (startprice and endprice) to
‘searchres.asp.’

On ‘searchres.asp’ I have created a results table using the database results
wizard. In the DRW I have made a custom query (my database is called ‘houses’
and contains the column ‘Price_per_month’):

SELECT * FROM Houses WHERE(Price_per_month BETWEEN ::startprice:: AND
::endprice:

When I test my two pages on the server I get the following error message:
Database Results Wizard Error
The operation failed. If this continues, please contact your server
administrator.

I’ve tried several things to figure out what the problem is:

1. I changed the custom query to:
SELECT * FROM Houses WHERE(Price_per_month = ::startprice:

2. I changed the custom query to:
SELECT * FROM Houses WHERE(Price_per_month = ::endprice:

3. I changed the custom query to:
SELECT * FROM Houses WHERE(Price_per_month BETWEEN 0 AND 1500)

These queries all work fine when I run my pages on my server. So how come I
can’t run:
SELECT * FROM Houses WHERE(Price_per_month BETWEEN ::startprice:: AND
::endprice:

Any help will be greatly appreciated.

Margot
(working with FP2003)
 
Reply With Quote
 
 
 
 
Ted
Guest
Posts: n/a
 
      4th Feb 2007
If you have a value to compare you car write it like this

SELECT * FROM HousesWHERE (price1< 710 AND price2> 700)

"Margot" <(E-Mail Removed)> skrev i meddelandet
news01F1A47-7E00-443B-8165-(E-Mail Removed)...
> Hi,
> I want to make a 'BETWEEN'-clause with 2 parameters in the database
> results
> wizard, but I keep getting an error message when I test my pages on my
> server. Can anyone help me with this? Details are provided below.
>
> I have made 2 webpages. The 1st page is called search.asp and the 2nd one
> searchres.asp.
> On 'search.asp' I have created a form with 2 dropdown boxes which are
> named:
> startprice and endprice.
> 'Search.asp' posts the form results (startprice and endprice) to
> 'searchres.asp.'
>
> On 'searchres.asp' I have created a results table using the database
> results
> wizard. In the DRW I have made a custom query (my database is called
> 'houses'
> and contains the column 'Price_per_month'):
>
> SELECT * FROM Houses WHERE(Price_per_month BETWEEN ::startprice:: AND
> ::endprice:
>
> When I test my two pages on the server I get the following error message:
> Database Results Wizard Error
> The operation failed. If this continues, please contact your server
> administrator.
>
> I've tried several things to figure out what the problem is:
>
> 1. I changed the custom query to:
> SELECT * FROM Houses WHERE(Price_per_month = ::startprice:
>
> 2. I changed the custom query to:
> SELECT * FROM Houses WHERE(Price_per_month = ::endprice:
>
> 3. I changed the custom query to:
> SELECT * FROM Houses WHERE(Price_per_month BETWEEN 0 AND 1500)
>
> These queries all work fine when I run my pages on my server. So how come
> I
> can't run:
> SELECT * FROM Houses WHERE(Price_per_month BETWEEN ::startprice:: AND
> ::endprice:
>
> Any help will be greatly appreciated.
>
> Margot
> (working with FP2003)



 
Reply With Quote
 
=?Utf-8?B?TWFyZ290?=
Guest
Posts: n/a
 
      4th Feb 2007
Thank you Ted. I completely overlooked that there is also an easy way to do
it. You're my hero.

Margot

"Ted" wrote:

> If you have a value to compare you car write it like this
>
> SELECT * FROM HousesWHERE (price1< 710 AND price2> 700)
>
> "Margot" <(E-Mail Removed)> skrev i meddelandet
> news01F1A47-7E00-443B-8165-(E-Mail Removed)...
> > Hi,
> > I want to make a 'BETWEEN'-clause with 2 parameters in the database
> > results
> > wizard, but I keep getting an error message when I test my pages on my
> > server. Can anyone help me with this? Details are provided below.
> >
> > I have made 2 webpages. The 1st page is called search.asp and the 2nd one
> > searchres.asp.
> > On 'search.asp' I have created a form with 2 dropdown boxes which are
> > named:
> > startprice and endprice.
> > 'Search.asp' posts the form results (startprice and endprice) to
> > 'searchres.asp.'
> >
> > On 'searchres.asp' I have created a results table using the database
> > results
> > wizard. In the DRW I have made a custom query (my database is called
> > 'houses'
> > and contains the column 'Price_per_month'):
> >
> > SELECT * FROM Houses WHERE(Price_per_month BETWEEN ::startprice:: AND
> > ::endprice:
> >
> > When I test my two pages on the server I get the following error message:
> > Database Results Wizard Error
> > The operation failed. If this continues, please contact your server
> > administrator.
> >
> > I've tried several things to figure out what the problem is:
> >
> > 1. I changed the custom query to:
> > SELECT * FROM Houses WHERE(Price_per_month = ::startprice:
> >
> > 2. I changed the custom query to:
> > SELECT * FROM Houses WHERE(Price_per_month = ::endprice:
> >
> > 3. I changed the custom query to:
> > SELECT * FROM Houses WHERE(Price_per_month BETWEEN 0 AND 1500)
> >
> > These queries all work fine when I run my pages on my server. So how come
> > I
> > can't run:
> > SELECT * FROM Houses WHERE(Price_per_month BETWEEN ::startprice:: AND
> > ::endprice:
> >
> > Any help will be greatly appreciated.
> >
> > Margot
> > (working with FP2003)

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
database results wizard error Rick Microsoft Frontpage 11 11th Mar 2008 02:07 PM
Sending ASP variable to Database Results Wizard query Michael Rothstein Microsoft Frontpage 16 24th Feb 2005 03:24 AM
Using Custom Query in the Database Results Wizard =?Utf-8?B?V2VhdmVkZXY=?= Microsoft Frontpage 8 5th Jul 2004 01:49 PM
How to Add an All Values Item to a Database Query by Using the FrontPage 2003 Database Results Wizard =?Utf-8?B?RGFuaWVs?= Microsoft Frontpage 4 2nd Feb 2004 05:36 PM
Custom database results query Paul Microsoft Frontpage 7 15th Sep 2003 11:21 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:36 AM.