need help with Database results component

J

John

hi Everybody,

I'm working on a Web site that reads a simple database file created in
Access.

The Web site has an asp page called results.asp and I used Frontpage to
design it. Part of the asp page is the Database results component

There are 3 scenarios:

1. I need to display all the data from the database file and the URL and
custome query look like this:

http://localhost/data/result.asp

SELECT * FROM tblData ORDER BY Year DESC,

2. I need to display all the data that match certain year

http://localhost/data/result.asp?Year=2006

SELECT * FROM tblData WHERE (Year = ::Year::)
ORDER BY Year DESC


3. I need to display all the data that match certain name

http://localhost/data/result.asp?Name=Smith

SELECT * FROM tblData WHERE (Name = ::Name::)
ORDER BY Year DESC

My question is how do I combine all 3 above into the Database results
component

TIA
 
S

Stefan B Rusynko

See the tips at
http://spiderwebwoman.com/resources/dbrwtipsandtricks.asp

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
_____________________________________________


| hi Everybody,
|
| I'm working on a Web site that reads a simple database file created in
| Access.
|
| The Web site has an asp page called results.asp and I used Frontpage to
| design it. Part of the asp page is the Database results component
|
| There are 3 scenarios:
|
| 1. I need to display all the data from the database file and the URL and
| custome query look like this:
|
| http://localhost/data/result.asp
|
| SELECT * FROM tblData ORDER BY Year DESC,
|
| 2. I need to display all the data that match certain year
|
| http://localhost/data/result.asp?Year=2006
|
| SELECT * FROM tblData WHERE (Year = ::Year::)
| ORDER BY Year DESC
|
|
| 3. I need to display all the data that match certain name
|
| http://localhost/data/result.asp?Name=Smith
|
| SELECT * FROM tblData WHERE (Name = ::Name::)
| ORDER BY Year DESC
|
| My question is how do I combine all 3 above into the Database results
| component
|
| TIA
|
|
 

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