How do I filter database results using an ASP

M

Mick

I use an Access Database. Then using the DBRW I select the Table I want to
use as the source of data, no problem. I know I can create a dropdown at the
top of the ASP to select a particular field to filter by, but how do I
select one field from the results in the format shown below "in the address
bar" to filter the results please.
e.g.
http://www.mydomain.com/query.asp?field=parameter
All that happens is everything after the ".asp" seems to be ignored and I
just get a full set of records without any filtering.
Many thanks for your help
 
S

Stefan B Rusynko

See http://home.att.net/~codelibrary/FrontPage/tweaks.htm#Passing Query Values

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


|I use an Access Database. Then using the DBRW I select the Table I want to
| use as the source of data, no problem. I know I can create a dropdown at the
| top of the ASP to select a particular field to filter by, but how do I
| select one field from the results in the format shown below "in the address
| bar" to filter the results please.
| e.g.
| http://www.mydomain.com/query.asp?field=parameter
| All that happens is everything after the ".asp" seems to be ignored and I
| just get a full set of records without any filtering.
| Many thanks for your help
 
M

Mick

Stefan, absolutely brilliant. I have been trying to do this for months!! It
works a treat, you are a Star Web Man, and many thanks Mick
 
M

Mick

Stefan, many thanks again.While Im on a roll here, another quick Q. Can I
modify the SQL further to include "another parameter" i.e. SELECT* FROM
TABLENAME WHERE FIELD=::parameter:: AND WHERE FIELD2=::anotherparameter::.
Or something like this.
Many thanks again
Mick
 
S

Stefan B Rusynko

Yes
But as
SELECT * FROM TABLENAME WHERE FIELD=::parameter:: AND FIELD2=::anotherparameter::.


--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| Stefan, many thanks again.While Im on a roll here, another quick Q. Can I
| modify the SQL further to include "another parameter" i.e. SELECT* FROM
| TABLENAME WHERE FIELD=::parameter:: AND WHERE FIELD2=::anotherparameter::.
| Or something like this.
| Many thanks again
| Mick
|
| "Stefan B Rusynko" wrote:
|
| > See http://home.att.net/~codelibrary/FrontPage/tweaks.htm#Passing Query Values
| >
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > To find the best Newsgroup for FrontPage support see:
| > http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
| > _____________________________________________
| >
| >
| > |I use an Access Database. Then using the DBRW I select the Table I want to
| > | use as the source of data, no problem. I know I can create a dropdown at the
| > | top of the ASP to select a particular field to filter by, but how do I
| > | select one field from the results in the format shown below "in the address
| > | bar" to filter the results please.
| > | e.g.
| > | http://www.mydomain.com/query.asp?field=parameter
| > | All that happens is everything after the ".asp" seems to be ignored and I
| > | just get a full set of records without any filtering.
| > | Many thanks for your help
| >
| >
| >
 

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