Problem accessing certain records from access db using asp (1 Viewer)

Pluribus

New member
Local time
Today, 07:22
Joined
Dec 6, 2010
Messages
3
Hi all

I am having a problem with an access database and was wondering if anyone could shed some light on it for me?

I have an asp page that serves content from an access database, depending on the variables added to the url - for example:

products.asp?pl=gardenmowers shows everything in the gardenmowers category, products.asp?pl=handtools shows the handtools etc.

Unfortunately for me, it is being very selective in what it wants to show. All the records are in the same table and the same products.asp page is used to serve all the content to the user. I have checked spellings, formatting etc but that is not the problem. In some instances I get a 404, others get a 500.

I cant understand what is causing the problem and I have been tearing my hair out for about a week trying to figure it out.

I have uploaded the database and the products.asp page in the attached zip file. I would appreciate it if someone could take a look and tell me where I have gone wrong.

Thanks

Ian
 

Attachments

  • products.asp.zip
    439.7 KB · Views: 777

Simon_MT

Registered User.
Local time
Today, 14:22
Joined
Feb 26, 2007
Messages
2,177
For a start

hedgecutteraccessories is misspelt as hedgecutteraccesories, only one "S"

Instead of the Case statement you should create a stocktypes table and use a query instead of referencing the stockdetails table.

I will look at this further tonight.

Simon
 

Simon_MT

Registered User.
Local time
Today, 14:22
Joined
Feb 26, 2007
Messages
2,177
I have checked that there are 774 records and without WHERE type='" & trim(pro_type) & "' in the SQL Select statement that is the recordcount.

1) I have taken out the Case statement and created a table stocktypes
2) I have added a query qry_stockdetails and reworked the SQL statement
3) I have moved the mdb file into a directory /Data.
4) I substituted the title metatag and tidied up the metatags.
5) You will have add the next/previous/fill gifs
6) I have added PageSize and intRow when to drop a </tr><tr>
7) You should not mix and match Divs and tables. You use divs so I would suggest stick with them
8) I have replaced the DO with a FOR - i and MOD are not required.
9) I have added Record counter and Page Numbering, this will need to be repositioned.

Simon
 

Attachments

  • Test.zip
    503.4 KB · Views: 728

Users who are viewing this thread

Top Bottom