Go Back   Access World Forums > Apps and Windows > Web Design and Development > ASP and ASP.NET

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 06-05-2011, 01:34 AM   #1
Pluribus
Newly Registered User
 
Join Date: Dec 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Pluribus is on a distinguished road
Question Problem accessing certain records from access db using asp

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
Attached Files
File Type: zip products.asp.zip (439.7 KB, 195 views)

Pluribus is offline   Reply With Quote
Old 09-14-2011, 12:08 PM   #2
Simon_MT
Newly Registered User
 
Join Date: Feb 2007
Location: United Kingdom
Posts: 2,177
Thanks: 2
Thanked 162 Times in 158 Posts
Simon_MT has a spectacular aura about Simon_MT has a spectacular aura about
Re: Problem accessing certain records from access db using asp

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 is offline   Reply With Quote
Old 09-14-2011, 04:42 PM   #3
Simon_MT
Newly Registered User
 
Join Date: Feb 2007
Location: United Kingdom
Posts: 2,177
Thanks: 2
Thanked 162 Times in 158 Posts
Simon_MT has a spectacular aura about Simon_MT has a spectacular aura about
Re: Problem accessing certain records from access db using asp

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
Attached Files
File Type: zip Test.zip (503.4 KB, 175 views)

Simon_MT is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting started, accessing records etc firefly2k8 Modules & VBA 3 11-18-2010 05:31 AM
accessing records in a query Toeying Queries 8 08-12-2010 07:59 AM
Not Accessing Tables Records? knowledge76 Modules & VBA 8 05-20-2005 12:51 AM
[SOLVED] accessing records in one table that are not in another??? rastario Queries 2 03-12-2003 10:31 AM
problem: accessing Word from Access via VBA kb Modules & VBA 0 03-20-2001 08:51 AM




All times are GMT -8. The time now is 03:43 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Sponsored Links

How to advertise

Media Kit


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World