DRW displays partial data

T

Trillian

I'm trying to repair an .asp page that uses either of two dropdowns to limit
results from a linked Access db.

The first dropdown value is "wtb", it works fine with the code as shown.

The second dropdown value is "wtbst", it never works and I get the default
"Record Not Found" message.

I think the problem is that the first dropdown is used in the "Select"
statement and when you only select from the second box, the wtb box matches
the default value of "00" in the dropdown list and goes no further.

Here are some questions:
1. What is {SOURCE} eq {fp_Source}? I can't find this anywhere.
2. Do I need to put the entire string as shown below in the Select statment?
3. If I need to set a default value for wtbst as well as wtb, how do I do
that in the second bit of code shown below? (fp_sDefault="wtb=00",
"wtbst="00"?)

Here's the pertinent part of the DRW code:

s-criteria="{SOURCE} eq {fp_Source} and (({ID} EQ {wtb}) or
({StateorProvince} EQ {wtbst})) +" s-order="[CompanyName] + [StateOrProvince]
+" s-sql="SELECT * FROM WhereToBuy WHERE (ID = ::wtb::)

Here are the first two lines of the DRW definition:

fp_sQry="SELECT * FROM WhereToBuy WHERE (ID = ::wtb::) ORDER BY ..."
fp_sDefault="wtb=00"
 
J

Jim Buyens

Don't mess with code that FrontPage generates, such as the

{SOURCE} eq {fp_Source}

in

s-criteria="{SOURCE} eq {fp_Source} and (({ID} EQ {wtb}) or
({StateorProvince} EQ {wtbst})) +" s-order="[CompanyName] + [StateOrProvince]
+" s-sql="SELECT * FROM WhereToBuy WHERE (ID = ::wtb::)

This is FrontPage-generated code, and FrotnPage is likely to re-generate it,
overwriting your changes, at any time.

As to selecting based on either of two drop-down lists named wtb and wtbst,
I'm going to assume the default (no filtration wanted) value is 0 and that
the database fields are also named wtb and wtbst. If so, you should code the
WHERE clause of a custom query like this:

WHERE (('::wtb::' = '0') or ([wtb] = '::wtb::'))
AND (('::wtbst::' = '0') or ([wtbst] = '::wtbst::'))

Jim Buyens
Microsoft MVP
http://www.interlacken.com
Author of:
*-----------------------------­-----------------------
|\----------------------------­-----------------------
|| Microsoft Windows SharePoint Services Inside Out
|| Microsoft Office FrontPage 2003 Inside Out
||----------------------------­-----------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/----------------------------­-----------------------
*-----------------------------­-----------------------
 
T

Trillian

Thank you - with a little tweaking I've got it working.

Jim Buyens said:
Don't mess with code that FrontPage generates, such as the

{SOURCE} eq {fp_Source}

in

s-criteria="{SOURCE} eq {fp_Source} and (({ID} EQ {wtb}) or
({StateorProvince} EQ {wtbst})) +" s-order="[CompanyName] + [StateOrProvince]
+" s-sql="SELECT * FROM WhereToBuy WHERE (ID = ::wtb::)

This is FrontPage-generated code, and FrotnPage is likely to re-generate it,
overwriting your changes, at any time.

As to selecting based on either of two drop-down lists named wtb and wtbst,
I'm going to assume the default (no filtration wanted) value is 0 and that
the database fields are also named wtb and wtbst. If so, you should code the
WHERE clause of a custom query like this:

WHERE (('::wtb::' = '0') or ([wtb] = '::wtb::'))
AND (('::wtbst::' = '0') or ([wtbst] = '::wtbst::'))

Jim Buyens
Microsoft MVP
http://www.interlacken.com
Author of:
*-----------------------------­-----------------------
|\----------------------------­-----------------------
|| Microsoft Windows SharePoint Services Inside Out
|| Microsoft Office FrontPage 2003 Inside Out
||----------------------------­-----------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/----------------------------­-----------------------
*-----------------------------­-----------------------

Trillian said:
I'm trying to repair an .asp page that uses either of two dropdowns to limit
results from a linked Access db.

The first dropdown value is "wtb", it works fine with the code as shown.

The second dropdown value is "wtbst", it never works and I get the default
"Record Not Found" message.

I think the problem is that the first dropdown is used in the "Select"
statement and when you only select from the second box, the wtb box matches
the default value of "00" in the dropdown list and goes no further.

Here are some questions:
1. What is I can't find this anywhere.
2. Do I need to put the entire string as shown below in the Select statment?
3. If I need to set a default value for wtbst as well as wtb, how do I do
that in the second bit of code shown below? (fp_sDefault="wtb=00",
"wtbst="00"?)

Here's the pertinent part of the DRW code:

s-criteria="{SOURCE} eq {fp_Source} and (({ID} EQ {wtb}) or
({StateorProvince} EQ {wtbst})) +" s-order="[CompanyName] + [StateOrProvince]
+" s-sql="SELECT * FROM WhereToBuy WHERE (ID = ::wtb::)

Here are the first two lines of the DRW definition:

fp_sQry="SELECT * FROM WhereToBuy WHERE (ID = ::wtb::) ORDER BY ..."
fp_sDefault="wtb=00"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top