|
| |
|
|
webcats
Posts: 5 Joined: 8/23/2003 Status: offline
|
Database using Access query - passing parameter - 8/23/2003 22:22:56
I'm using .asp pages to query an Access database using a query I created in Access (specified in the DRW). What I'd like to do is specify a parameter to limit the query's results. The query field that I'm using, AreaID should = the specific Website (there are about 12). I tried creating the database results, then changing to HTML view and adding "WHERE AreaID=3" to the "s-sql=" and "fp_sQry=" parts, but I get an error: Too few parameters. Expected 1. Number: -2147217904 I'd prefer not to use a Custom Query. Anyone have any ideas? Thanks.
|
|
|
|
webcats
Posts: 5 Joined: 8/23/2003 Status: offline
|
RE: Database using Access query - passing parameter - 8/24/2003 16:04:51
Hi, here it is: fp_sQry="SELECT * FROM qryPets WHERE AreaID=3" Thanks.
|
|
|
|
webcats
Posts: 5 Joined: 8/23/2003 Status: offline
|
RE: Database using Access query - passing parameter - 8/24/2003 17:02:33
Yeah, I think you're right about it not being possible. When I modify the "fp_sQry="SELECT * FROM qryPets" line to "fp_sQry="SELECT * FROM qryPets WHERE AreaID=3" then save... it goes back to the plain Select line. (I didn't notice that before...) Now I gotta get out my ASP Databases book and start reading! Thanks anyway.
|
|
|
|
BeTheBall
Posts: 6362 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: Database using Access query - passing parameter - 8/24/2003 18:23:09
quote:
When I modify the "fp_sQry="SELECT * FROM qryPets" line to "fp_sQry="SELECT * FROM qryPets WHERE AreaID=3" then save... it goes back to the plain Select line. (I didn't notice that before...) The code is re-writing itself because of the extra code that Frontpage puts in (the gray code). Find the same SQL in the gray code and make your change there instead of in the red. It should work. You also may want to learn how to get rid of the gray code. It makes life a lot easier. Read about the Spooky Diet.
< Message edited by betheball -- 8/24/2003 6:28:37 PM >
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|