|
Follow Hirst's advice. In particular, Response.Write(some debug info here) is an invaluable tool. Since you can't debug old school ASP code, this is the best tool in our box for figuring out what went wrong.
When MS Access throws the "Too few paremeters - expected x" error, it means that it doesn't understand something in your query, and has decided to make that a parameter. Which is a pretty good guess on its part, but not always right. For example ( and try this with me ), if you set up a query that says "SELECT * FROM custompages WHERE custompageurl = someURL" and then execute the query, before it actually runs, it will give you a dialog box asking for a value for someURL. Then it will run the query using that value. Only, dialog boxes don't work on the web, so instead it throws an error if there's a parameter it doesn't have a value for. If you drop in your query string, it's going to see it as an unknown field, and assume it's a parameter.
Next, I think there's a mistake in your SQL and carried over into Chris's example. If custompageurl is a field in your talbe, you don't want single quotes ( ' ) around it.
|